Apply suggestions from code review

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
Andrii 2020-09-13 00:40:22 +03:00 committed by GitHub
parent 3835395591
commit bea30a879d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ static int ListdirCallback(const char *pItemName, int IsDir, int StorageType, vo
{ {
ListDirectoryContext Context = *((ListDirectoryContext *)pUser); ListDirectoryContext Context = *((ListDirectoryContext *)pUser);
char aName[2048]; char aName[2048];
str_format(aName, sizeof(aName), "%s\\%s", Context.pPath, pItemName); str_format(aName, sizeof(aName), "%s/%s", Context.pPath, pItemName);
ProcessItem(aName, Context.pStorage); ProcessItem(aName, Context.pStorage);
} }
@ -51,6 +51,7 @@ int main(int argc, const char **argv)
if(argc == 1) if(argc == 1)
{ {
dbg_msg("usage", "%s FILE1 [ FILE2... ]", argv[0]); dbg_msg("usage", "%s FILE1 [ FILE2... ]", argv[0]);
dbg_msg("usage", "%s DIRECTORY", argv[0]);
return -1; return -1;
} }
else if(argc == 2 && fs_is_dir(argv[1])) else if(argc == 2 && fs_is_dir(argv[1]))