We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd28f2c commit c4c6d18Copy full SHA for c4c6d18
cpp/fzip/src/fzip.cpp
@@ -313,17 +313,17 @@ void parseArgs(int argc, const char **argv) {
313
usage(string("Cannot opendir ") + arg);
314
}
315
316
-
317
while ((dp = readdir(dirp)) != NULL) {
318
- struct stat st;
319
- std::string path = string(arg) + "/" + dp->d_name;
320
- if(0 == stat(path.c_str(), &st)){
321
- if (S_ISREG(st.st_mode)) {
322
- paths.push_back(path);
323
- }
324
- }else{
325
- usage(string("Cannot stat ") + arg);
326
+ struct stat st;
+ string path = string(arg) + "/" + dp->d_name;
+ if (0 == stat(path.c_str(), &st)) {
+ if (S_ISREG(st.st_mode)) {
+ paths.push_back(path);
+ }
+ else {
+ usage(string("Cannot stat ") + arg);
327
328
329
closedir(dirp);
0 commit comments