avformat/file: Fix file delete for Windows
Fixes bug id : 7638
This commit is contained in:
parent
ab160efa28
commit
e9564f7fea
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue