mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
mkalldirs: Reset ret when errno is EEXIST.
This bug was revelead while using bittorrent. For filenames started with a dot and two slashes .// the open_bittorrent_file returned -1 and set errno to EEXIST.
This commit is contained in:
parent
5e88382033
commit
f994ef4335
@ -619,8 +619,10 @@ mkalldirs(const unsigned char *path)
|
||||
|
||||
p[pos] = separator;
|
||||
|
||||
if (ret < 0 && errno != EEXIST)
|
||||
break;
|
||||
if (ret < 0) {
|
||||
if (errno != EEXIST) break;
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
|
||||
fmem_free(p);
|
||||
|
Loading…
Reference in New Issue
Block a user