diff options
author | Karthick Jeyapal <kjeyapal@akamai.com> | 2018-12-31 10:37:49 +0300 |
---|---|---|
committer | Karthick J <kjeyapal@akamai.com> | 2019-01-07 09:11:20 +0300 |
commit | e9564f7feaf25b5c0ccd73e835b69a0dbba06786 (patch) | |
tree | e746052416ca8103a46d4defdf510a5a29365fca /libavformat | |
parent | ab160efa2850715de32e24fed846a0f6ef7244ab (diff) |
avformat/file: Fix file delete for Windows
Fixes bug id : 7638
Diffstat (limited to 'libavformat')
-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); |