diff options
author | Clint Adams <clint@users.sourceforge.net> | 2000-08-02 14:20:41 +0000 |
---|---|---|
committer | Clint Adams <clint@users.sourceforge.net> | 2000-08-02 14:20:41 +0000 |
commit | de7b6730bcebf08368e7531b68c6a2598166eb86 (patch) | |
tree | 84346c80d789be066ed3bc6e42bee6244e9b322c /Src/Modules/files.c | |
parent | 30e35ee2ed1cf4a574fc9017229c43fc84105b5b (diff) | |
download | zsh-de7b6730bcebf08368e7531b68c6a2598166eb86.tar.gz zsh-de7b6730bcebf08368e7531b68c6a2598166eb86.tar.xz zsh-de7b6730bcebf08368e7531b68c6a2598166eb86.zip |
12489: pathconf for unlimited fs
Diffstat (limited to 'Src/Modules/files.c')
-rw-r--r-- | Src/Modules/files.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/Modules/files.c b/Src/Modules/files.c index 388e35a55..b5e0b5f62 100644 --- a/Src/Modules/files.c +++ b/Src/Modules/files.c @@ -95,12 +95,13 @@ bin_mkdir(char *nam, char **args, char *ops, int func) while(ptr > *args + (**args == '/') && *--ptr == '/') *ptr = 0; #ifdef HAVE_PATHCONF - if((pathmax = pathconf(*args,_PC_PATH_MAX)) == -1) { + errno = 0; + if(((pathmax = pathconf(*args,_PC_PATH_MAX)) == -1) && errno) { zwarnnam(nam, "%s: %e", *args, errno); err = 1; continue; } - else if(ztrlen(*args) > pathmax - 1) { + else if((ztrlen(*args) > pathmax - 1) && errno != -1) { #else if(ztrlen(*args) > PATH_MAX - 1) { #endif |