proper handling of empty dirs (hopefully)
This commit is contained in:
@@ -82,10 +82,15 @@ char* smartstrcasestr(const char *haystack, const char *needle){
|
||||
|
||||
|
||||
char* parse_cmd(const char *cmd, file *f){
|
||||
char *out;
|
||||
if (f == NULL) {
|
||||
out = malloc(strlen(cmd)+1);
|
||||
memcpy(out, cmd, strlen(cmd)+1);
|
||||
return out;
|
||||
}
|
||||
const char *offset = strstr(cmd, SETTINGS_COMMAND_REPLACE_STR);
|
||||
|
||||
int count = 0;
|
||||
char *out;
|
||||
char *pos;
|
||||
unsigned long i = 0;
|
||||
while(f->file_name[i]) {
|
||||
|
||||
Reference in New Issue
Block a user