Make detection of symbolic links more consistent
While fixing the detection of symbolic links on OpenBSD I noticed inconsistent behaviour: $ echo hello > hello $ ln -s hello world $ zstd hello world Warning : world is a symbolic link, ignoring hello :316.67% ( 6 => 19 bytes, hello.zst $ ls *.zst hello.zst $ zstd world world :316.67% ( 6 => 19 bytes, world.zst) $ ls *.zst hello.zst world.zst
This commit is contained in:
parent
1e4dc2e5f1
commit
482b84f07b
@ -951,6 +951,8 @@ int main(int argCount, const char* argv[])
|
||||
filenameTable[fileNamesNb++] = filenameTable[u];
|
||||
}
|
||||
}
|
||||
if (fileNamesNb == 0 && filenameIdx > 0)
|
||||
CLEAN_RETURN(1);
|
||||
filenameIdx = fileNamesNb;
|
||||
}
|
||||
if (recursive) { /* at this stage, filenameTable is a list of paths, which can contain both files and directories */
|
||||
|
Loading…
x
Reference in New Issue
Block a user