Windows: Implement System_ShareFile as a Save As dialog

Win32 has no share sheet hookup yet, so sharing a file offers to save a
copy of it. ShareFilesAsZip no longer needs an app cache directory, which
Windows doesn't set; it falls back to the memstick cache folder through
DIRECTORY_APP_CACHE. The save dialog now asks before overwriting.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-11 21:52:38 +02:00
1 parent 7cab022eaf
commit 0d032fa2ee
3 files changed
+38 -4

No files matched your search

+1 -1
View File
@@ -135,7 +135,7 @@ std::string BrowseForFolder2(HWND parent, std::string_view title, std::string_vi
ofn.nMaxFile = ARRAY_SIZE(fileBuffer);
ofn.Flags = OFN_NOCHANGEDIR | OFN_EXPLORER;
if (!_bLoad)
ofn.Flags |= OFN_HIDEREADONLY;
ofn.Flags |= OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
int success = _bLoad ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn);
if (success) {