mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 23:18:29 +00:00
filesystem: Improve docs, make some promises about overwrites and file caches.
Note that SDL_FlushIO() doesn't make promises about file data sync but that is intended to be changed in the IOStream code in a later commit. Fixes #10886.
This commit is contained in:
@@ -121,7 +121,12 @@ bool SDL_SYS_CopyFile(const char *oldpath, const char *newpath)
|
||||
SDL_CloseIO(input);
|
||||
input = NULL;
|
||||
|
||||
if (!SDL_FlushIO(output)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!SDL_CloseIO(output)) {
|
||||
output = NULL; // it's gone, even if it failed.
|
||||
goto done;
|
||||
}
|
||||
output = NULL;
|
||||
|
@@ -151,7 +151,7 @@ bool SDL_SYS_CopyFile(const char *oldpath, const char *newpath)
|
||||
return false;
|
||||
}
|
||||
|
||||
const BOOL rc = CopyFileW(woldpath, wnewpath, TRUE);
|
||||
const BOOL rc = CopyFileExW(woldpath, wnewpath, NULL, NULL, NULL, COPY_FILE_ALLOW_DECRYPTED_DESTINATION|COPY_FILE_NO_BUFFERING);
|
||||
SDL_free(wnewpath);
|
||||
SDL_free(woldpath);
|
||||
if (!rc) {
|
||||
|
Reference in New Issue
Block a user