[FFmpeg-cvslog] avformat/file: Fix file delete for Windows
Karthick Jeyapal
git at videolan.org
Mon Jan 7 08:25:33 EET 2019
ffmpeg | branch: master | Karthick Jeyapal <kjeyapal at akamai.com> | Mon Dec 31 13:25:49 2018 +0530| [e9564f7feaf25b5c0ccd73e835b69a0dbba06786] | committer: Karthick J
avformat/file: Fix file delete for Windows
Fixes bug id : 7638
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e9564f7feaf25b5c0ccd73e835b69a0dbba06786
---
libavformat/file.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list