1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-07 06:23:00 +03:00

Gating named file support on windows

This commit is contained in:
Bimba Shrestha
2019-10-25 11:32:38 -07:00
parent 10f7147013
commit 5b45ff4f1c
3 changed files with 30 additions and 0 deletions

View File

@@ -992,11 +992,25 @@ int main(int argCount, const char* argv[])
if (!followLinks) {
unsigned u;
for (u=0, fileNamesNb=0; u<filenameIdx; u++) {
#ifdef _MSC_VER
if (UTIL_isLink(filenameTable[u])) {
DISPLAYLEVEL(2, "Warning : %s is a symbolic link, ignoring\n", filenameTable[u]);
} else {
filenameTable[fileNamesNb++] = filenameTable[u];
}
#else
if (UTIL_isLink(filenameTable[u]) && !UTIL_isFIFO(filenameTable[u])) {
DISPLAYLEVEL(2, "Warning : %s is a symbolic link, ignoring\n", filenameTable[u]);
} else {
filenameTable[fileNamesNb++] = filenameTable[u];
}
#endif /* _MSC_VER */
}
if (fileNamesNb == 0 && filenameIdx > 0)
CLEAN_RETURN(1);