diff options
author | Karthick Jeyapal <kjeyapal@akamai.com> | 2018-12-31 13:07:49 +0530 |
---|---|---|
committer | Karthick J <kjeyapal@akamai.com> | 2019-01-07 11:41:20 +0530 |
commit | e9564f7feaf25b5c0ccd73e835b69a0dbba06786 (patch) | |
tree | e746052416ca8103a46d4defdf510a5a29365fca | |
parent | ab160efa2850715de32e24fed846a0f6ef7244ab (diff) | |
download | ffmpeg-e9564f7feaf25b5c0ccd73e835b69a0dbba06786.tar.gz |
avformat/file: Fix file delete for Windows
Fixes bug id : 7638
-rw-r--r-- | libavformat/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c index 1d321c4205..e613b91010 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -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); |