1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avformat/file: Fix file delete for Windows

Fixes bug id : 7638
This commit is contained in:
Karthick Jeyapal 2018-12-31 13:07:49 +05:30 committed by Karthick J
parent ab160efa28
commit e9564f7fea

View File

@ -173,7 +173,11 @@ static int file_delete(URLContext *h)
av_strstart(filename, "file:", &filename);
ret = rmdir(filename);
if (ret < 0 && errno == ENOTDIR)
if (ret < 0 && (errno == ENOTDIR
# ifdef _WIN32
|| errno == EINVAL
# endif
))
ret = unlink(filename);
if (ret < 0)
return AVERROR(errno);