1
0
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:
Witold Filipczyk 2008-03-27 08:52:45 +01:00 committed by Kalle Olavi Niemitalo
parent 5e88382033
commit f994ef4335

View File

@ -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);