Commit Graph

273 Commits

Author SHA1 Message Date
Alexandre Julliard b215536852 shell32: Use wide char string literals.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Alexandre Julliard 332b90c006 shell32: Use designated initializers and wide char string literals in known folder table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Alexandre Julliard 48d62fc623 shell32: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 20:24:05 +02:00
Alexandre Julliard d1e1efe0f6 shell32: Use the mount manager for initial shell folders creation.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-17 16:51:31 +02:00
Alexandre Julliard d603b22a0c shell32: Load the XDG user dirs config file using Win32 APIs.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-16 10:58:12 +02:00
Alexandre Julliard 5321428f64 shell32: Don't put shell folders inside My Documents.
Put them all at the same level, like recent Windows versions do.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 13:54:34 +02:00
Alexandre Julliard bf811fdcaf shell32: Pass the destination Windows path to _SHCreateSymbolicLink().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 13:17:14 +02:00
Alexandre Julliard 0a71ea7381 shell32: Avoid some code duplication.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-06 13:12:45 +02:00
André Zwing 9323d33fa4 shell32: Add IApplicationDocumentLists stub.
Lets Cablabel S3 Lite 1.4.0.2 start, otherwise it shows a msgbox with the error and freezes.

Signed-off-by: André Zwing <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 22:14:19 +02:00
Andrew Eikum c99a406b71 shell32: Fix unused knownfolder definition.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51425
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-08 21:13:17 +02:00
Andrew Eikum 978e03ea94 shell32: Always create default known folder directories.
Some applications query for the default path, but this would fail on
older prefixes where the new default path was never created.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-17 20:02:29 +02:00
Andrew Eikum 96030ce738 shell32: Use correct environment substitution for FOLDERID_Public.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 21:25:17 +02:00
Andrew Eikum 98d43c5dcf shell32: Calculate known folder paths from parent and relative path.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:40:37 +02:00
Andrew Eikum 4111801ab3 shell32: Use winvista+ AppData paths.
Katamari Damacy Reroll makes an assumption that the LocalAppData folder
is a sibling of the LocalAppDataLow folder.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:40:37 +02:00
Andrew Eikum 2a52efb7a3 shell32: Use stored registry path for known folder symlinks.
This allows us to keep the same symlinks for knownfolders after the
upcoming patches. A functional change is that, if a user or
application has redirected one of the known folders, we will now
attempt to create the symlink at the redirected path instead of the
default one.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:28:20 +02:00
Olivier F. R. Dierick 2aad95254c shell32: Create user folder symlinks on lookup and only if it's missing.
Change the logic so that when a user folder already exists in the
prefix, as a real directory or symbolic link, it's left as-is. Also
create a symbolic link, instead of a real directory, when looking up a
user folder that is currently missing.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:27:26 +01:00
Olivier F. R. Dierick 9cb47e8821 shell32: Add a function to create one specific symbolic link at a time for user dirs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:27:13 +01:00
Olivier F. R. Dierick 60915a5544 shell32: Move 'Desktop' symbolic link creation to a separate function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:26:58 +01:00
Olivier F. R. Dierick c6d8f1ac28 shell32: Move 'My Stuff' symbolic link creation in a separate generic function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:26:50 +01:00
Olivier F. R. Dierick fe89ae4965 shell32: Move 'My Documents' symbolic link creation in a separate function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:26:37 +01:00
Olivier F. R. Dierick a08d3fe10e shell32: Add a helper function to create a shell folder from CSIDL and return its unix path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:26:20 +01:00
Olivier F. R. Dierick 7642388153 shell32: Add a helper function to create 'My Stuff' sub dirs in 'My Documents'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:26:02 +01:00
Olivier F. R. Dierick 8c7c6e9b79 shell32: Add helper functions for XDG directories lookup and resource deallocation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:25:41 +01:00
Olivier F. R. Dierick 81b4dba58a shell32: Move _SHCreateSymbolicLinks() above shell folders lookup functions.
Looking up shell folders creates real directories when the folder is
inexistant, but the intended behavior for some folders is to create
symbolic links by default. Prepare that change by moving the helper
function above shell folders lookup functions. Also fix whitespace
issues in the moved code.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22974
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-20 16:25:07 +01:00
Gijs Vermeulen a5a2749cfe shell32: Implement PathResolve.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48082
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:06 +01:00
Alex Henrie 477ff7e034 shell32: Symlink the Downloads and Templates folders too.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-05 23:36:23 +01:00
Hans Leidekker 3ca6b296da shell32: Fix definitions for FOLDERID_ProgramFilesX64 and FOLDERID_ProgramFilesCommonX64 on 64-bit.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-14 15:45:18 +01:00
Sven Baars 48e6f8f99d shell32: Don't return a path from SHGetKnownFolderPath when it can not be created.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Alexandre Julliard 4a6855a575 shell32: Re-add support for expanding ALLUSERSPROFILE for backward compatibility.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-06 17:07:15 +02:00
Alexandre Julliard ceea5bda14 shell32: Avoid infinite loop in _SHExpandEnvironmentStrings.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-06 17:07:15 +02:00
Alexandre Julliard 54530bc493 shell32: Assume that system directory always contains a drive letter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-06 17:07:15 +02:00
Dmitry Timoshkov 27edd4e35c shell32: Use Public instead of AllUsersProfile in the registry.
This matches what recent Windows versions set in the process environment.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 12:39:59 +02:00
Józef Kucia ff7c2c5171 shell32: Accept more flags in SHGetKnownFolderPath().
KF_FLAG_SIMPLE_IDLIST | KF_FLAG_DONT_UNEXPAND doesn't seem to influence
results returned by SHGetKnownFolderPath().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-22 17:14:20 +02:00
Sebastian Lackner e98963f2ab shell32: Create Microsoft\Windows\Themes directory during prefix creation.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-17 10:51:22 +02:00
Nikolay Sivov 612a194133 shell32: Use ARRAY_SIZE macro.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 12:35:12 +01:00
Nikolay Sivov e3b200bd8a shell32: Use global memory allocation helpers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-22 14:16:33 +01:00
Nikolay Sivov bb09bb5750 shell32: Fix a trace message.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 16:21:33 +01:00
Nikolay Sivov f75d562596 shell32: Fix SHGetFolderPathAndSubDir() trace message.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-26 10:12:44 +01:00
Lucian Poston 349064216a shell32: Stub GetRedirectionCapabilities with S_OK.
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-24 17:33:44 +01:00
Vincent Povirk dcb1359b5e shell32: Change default ProgramData folder and set ProfileList key.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-24 14:08:18 +09:00
Andrey Gusev 8ea9c33829 shell32: Add IApplicationDestinations stub.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-08 19:22:18 +02:00
Nikolay Sivov 0bfb97dcba shell32: Pass correct buffer length to RegQueryValueExW().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-08 16:00:39 +01:00
Nikolay Sivov 3c6cbc2f91 shell32: Don't access uninitialized buffer (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-14 20:56:13 +01:00
Nikolay Sivov a0c259cf56 shell32: Move retrieving folder path logic to SHGetKnownFolderPath().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-12-06 18:57:36 +01:00
Hans Leidekker 567b52cd93 shell32: Implement IKnownFolderManager::GetFolderByName.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 16:32:00 +01:00
Jactry Zeng dad2223ad6 shell32: Use remove() instead of rmdir().
rmdir() will fail when target is a symbolic link.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-26 20:40:42 +09:00
Nikolay Sivov 95ecc29a50 shell32: Remove another recurring return code check (PVS-Studio).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 00:25:34 +09:00
Nikolay Sivov e2275b0a2a shell32: Remove recurring return value check (PVS-Studio).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-19 12:22:39 +09:00
Nikolay Sivov 69733d65e8 shell32: Handle string-to-guid conversion errors (Coverity). 2015-07-06 15:13:24 +09:00
Nikolay Sivov 80d28abdc8 shell32: Partially implement SHGetKnownFolderIDList(). 2015-05-11 15:39:25 +09:00