[PATCH 0/1] MR10001: shell32: Create parent directories when creating trash directory.
This reverts the first attempt in 93f3d8ae and replaces again the first CreateDirectoryW by an SHCreateDirectoryExW. Followup to: 93f3d8ae and 82ad0ecd Sorry for the inconvenience caused by my first attempt in !9960. Unfortunately I missed to expect inverse success return value from SHCreateDirectoryExW. With this mistake the failure still disappeared in previously failing testbot machines, but unfortunately gitlab started to show the failure. [Test pattern page](https://test.winehq.org/data/patterns.html#shell32:recyclebin) [Test run with this patch](https://testbot.winehq.org/JobDetails.pl?Key=161633) CC: @jactry -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10001
From: Bernhard Übelacker <bernhardu@mailbox.org> This reverts the first attempt in 93f3d8ae and replaces again the first CreateDirectoryW by an SHCreateDirectoryExW. Followup to: 93f3d8ae and 82ad0ecd --- dlls/shell32/recyclebin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c index 494088168f3..346339b4d80 100644 --- a/dlls/shell32/recyclebin.c +++ b/dlls/shell32/recyclebin.c @@ -118,16 +118,16 @@ static BOOL WINAPI init_trash_dirs( INIT_ONCE *once, void *param, void **context swprintf( files, len, fmt, home ); files[1] = '\\'; /* change \??\ to \\?\ */ for (p = files; *p; p++) if (*p == '/') *p = '\\'; - CreateDirectoryW( files, NULL ); + SHCreateDirectoryExW( NULL, files, NULL ); info = malloc( len * sizeof(WCHAR) ); lstrcpyW( info, files ); lstrcatW( files, L"\\files" ); lstrcatW( info, L"\\info" ); - if (!SHCreateDirectoryExW( NULL, info, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) goto done; + if (!CreateDirectoryW( info, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) goto done; trash_info_dir = info; } - if (!SHCreateDirectoryExW( NULL, files, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) goto done; + if (!CreateDirectoryW( files, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) goto done; trash_dir = files; random_seed = GetTickCount(); return TRUE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10001
participants (2)
-
Bernhard Übelacker -
Bernhard Übelacker (@bernhardu)