summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-03-05 01:28:44 +0300
committerAndrei Karas <akaras@inbox.ru>2017-03-05 01:28:44 +0300
commitfd475a8d275614953551f9f8867ad71266e41117 (patch)
tree0eb52f2087b499a23d40b809f986e33b2633edd7 /src
parent4a1b96155d76c8c6245cebcf876cc169fe63ce6a (diff)
downloadmv-fd475a8d275614953551f9f8867ad71266e41117.tar.gz
mv-fd475a8d275614953551f9f8867ad71266e41117.tar.bz2
mv-fd475a8d275614953551f9f8867ad71266e41117.tar.xz
mv-fd475a8d275614953551f9f8867ad71266e41117.zip
Fix compilation on windows.
Diffstat (limited to 'src')
-rw-r--r--src/fs/virtfs/virtfsdir.cpp7
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)