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:
Ryan C. Gordon committed 2024-09-26 19:29:03 -04:00
1 parent c1587b1eac
commit f267ec7681
4 files changed
+65 -5

No files matched your search

+5
View File
@@ -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;
+1 -1
View File
@@ -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) {