mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
Global: refactor strcmp() == 0 to ffStrEquals()
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "io.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -194,7 +195,7 @@ void listFilesRecursively(FFstrbuf* folder, uint8_t indentation, const char* fol
|
||||
{
|
||||
if(entry->d_type == DT_DIR)
|
||||
{
|
||||
if(strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0)
|
||||
if(ffStrEquals(entry->d_name, ".") || ffStrEquals(entry->d_name, ".."))
|
||||
continue;
|
||||
|
||||
ffStrbufAppendS(folder, entry->d_name);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "io.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
static void createSubfolders(const char* fileName)
|
||||
{
|
||||
@@ -118,7 +119,7 @@ void listFilesRecursively(FFstrbuf* folder, uint8_t indentation, const char* fol
|
||||
{
|
||||
if (entry.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
if(strcmp(entry.cFileName, ".") == 0 || strcmp(entry.cFileName, "..") == 0)
|
||||
if(ffStrEquals(entry.cFileName, ".") || ffStrEquals(entry.cFileName, ".."))
|
||||
continue;
|
||||
|
||||
ffStrbufSubstrBefore(folder, folderLength);
|
||||
|
||||
Reference in New Issue
Block a user