Skip to content

Commit

Permalink
fix mistype + refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rhash committed Jan 8, 2014
1 parent 9d3adc7 commit 9ce6569
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions find_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,9 @@ file_search_data* create_file_search_data(rsh_tchar** paths, size_t count, int m
}
}

/* fill the file_t structure */
/* mark the file as obtained from the command line */
file.mode |= FILE_IFROOT;
/* duplicate the string */
file.wpath = make_pathw(0, 0, path);
file.wpath = rsh_wcsdup(path);
add_root_file(data, &file);
}
} /* for */
Expand All @@ -160,7 +159,7 @@ file_search_data* create_file_search_data(rsh_tchar** paths, size_t count, int m
file.wpath = 0;
file.mtime = file.size = 0;

if (IS_DASH_STR(FILE.path))
if (IS_DASH_STR(file.path))
{
file.mode = FILE_IFSTDIN;
}
Expand All @@ -171,6 +170,7 @@ file_search_data* create_file_search_data(rsh_tchar** paths, size_t count, int m
}

file.mode |= FILE_IFROOT;
add_root_file(data, &file);
}
#endif
return data;
Expand Down

0 comments on commit 9ce6569

Please sign in to comment.