File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -49,17 +49,6 @@ int getFilesInDir( const std::string& dir, std::vector< std::string >& files )
49
49
WIN32_FIND_DATA findData;
50
50
HANDLE findHandle;
51
51
52
- #else
53
- DIR *dp;
54
- struct dirent *dirp;
55
- if ( ( dp = opendir ( dir.c_str () ) ) == NULL )
56
- {
57
- std::cerr << " Error(" << errno << " ) opening " << dir << std::endl;
58
- return errno;
59
- }
60
- #endif
61
-
62
- #if defined ( __WINDOWS__ )
63
52
findHandle = FindFirstFile ( ( dir + " \\ *" ).c_str (), &findData );
64
53
if ( findHandle == INVALID_HANDLE_VALUE )
65
54
{
@@ -78,6 +67,14 @@ int getFilesInDir( const std::string& dir, std::vector< std::string >& files )
78
67
}
79
68
80
69
#else
70
+ DIR *dp;
71
+ struct dirent *dirp;
72
+ if ( ( dp = opendir ( dir.c_str () ) ) == NULL )
73
+ {
74
+ std::cerr << " Error(" << errno << " ) opening " << dir << std::endl;
75
+ return errno;
76
+ }
77
+
81
78
while ( ( dirp = readdir ( dp ) ) != NULL )
82
79
{
83
80
const std::string filename ( dirp->d_name );
You can’t perform that action at this time.
0 commit comments