diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-03-05 01:28:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-03-05 01:28:44 +0300 |
commit | fd475a8d275614953551f9f8867ad71266e41117 (patch) | |
tree | 0eb52f2087b499a23d40b809f986e33b2633edd7 /src/fs | |
parent | 4a1b96155d76c8c6245cebcf876cc169fe63ce6a (diff) | |
download | plus-fd475a8d275614953551f9f8867ad71266e41117.tar.gz plus-fd475a8d275614953551f9f8867ad71266e41117.tar.bz2 plus-fd475a8d275614953551f9f8867ad71266e41117.tar.xz plus-fd475a8d275614953551f9f8867ad71266e41117.zip |
Fix compilation on windows.
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/virtfs/virtfsdir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fs/virtfs/virtfsdir.cpp b/src/fs/virtfs/virtfsdir.cpp index 42342b37b..0158dec2a 100644 --- a/src/fs/virtfs/virtfsdir.cpp +++ b/src/fs/virtfs/virtfsdir.cpp @@ -194,6 +194,7 @@ namespace VirtFsDir const std::string file = next_file->d_name; if (file == "." || file == "..") continue; +#ifndef WIN32 if (mPermitLinks == false) { struct stat statbuf; @@ -203,6 +204,8 @@ namespace VirtFsDir continue; } } +#endif // WIN32 + bool found(false); FOR_EACH (StringVectCIter, itn, names) { @@ -243,12 +246,16 @@ namespace VirtFsDir name.c_str()); return false; } +#ifndef WIN32 if (mPermitLinks == false) return false; struct stat statbuf; return lstat(name.c_str(), &statbuf) == 0 && S_ISLNK(statbuf.st_mode) != 0; +#else + return false; +#endif // WIN32 } void freeList(VirtList *restrict const handle) |