Commit e9564f7f authored by Karthick Jeyapal's avatar Karthick Jeyapal Committed by Karthick J

avformat/file: Fix file delete for Windows

Fixes bug id : 7638
parent ab160efa
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment