mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/file: Fix file delete for Windows
Fixes bug id : 7638
This commit is contained in:
parent
ab160efa28
commit
e9564f7fea
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue