lavf: Don't try to update files atomically with renames on windows
On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -365,4 +365,10 @@ static inline int ff_rename(const char *oldpath, const char *newpath)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#define USE_RENAME_REPLACE 1
|
||||
#else
|
||||
#define USE_RENAME_REPLACE 0
|
||||
#endif
|
||||
|
||||
#endif /* AVFORMAT_INTERNAL_H */
|
||||
|
Reference in New Issue
Block a user