Browse Source

avformat/file: Fix file delete for Windows

Fixes bug id : 7638
tags/n4.2
Karthick Jeyapal Karthick J 7 years ago
parent
commit
e9564f7fea
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      libavformat/file.c

+ 5
- 1
libavformat/file.c View File

@@ -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…
Cancel
Save