[Bug 22974] "Shell folders" settings are reset after each wine update

WineHQ Bugzilla wine-bugs at winehq.org
Mon Sep 23 22:55:11 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=22974

Olivier F. R. Dierick <o.dierick at piezo-forte.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #65280|0                           |1
        is obsolete|                            |

--- Comment #27 from Olivier F. R. Dierick <o.dierick at piezo-forte.be> ---
Created attachment 65285
  --> https://bugs.winehq.org/attachment.cgi?id=65285
v2 Patch 1/2 shell32: Move and split _SHCreateSymbolicLinks()

Hello,

Here is a new patchset that I think is cleaner.
I changed my mind and don't touch anything but the issue.
I think it will help getting the patchset approved sooner.
Other features deserve their own enhancement bugs anyway.

Patch 1/2:
- Splits the _SHCreateSymbolicLinks() into folder type-specific functions,
keeping the old logic intact. This way the different folders can be handled
separately.
- It also fixes some trailing whitespace in the moved code but that's
negligible.

Patch 2/2:
- Adds a helper function that creates a single symbolic link at a time, for the
folders we are interested in.
- Calls the helper function where the old code did only create a directory.
- Disables the removal of existing symlinks/directories, in the symlink
creation functions.
- Also says to not create the folder when looking up for its path for the
symlink, to avoid an infinite loop.

Note that the winecfg code handles the folder symlink/directory switching
itself, removing the symlink/directory as appropriate. It even makes a backup
of the directory when switching to a symlink and restores it when switching
back. The removal of the remove() calls doesn't affect the ability to manage
the shell folders through the winecfg UI.

Please, test the patchset thoroughly on your system and give feedback if it
breaks anything.
Meanwhile, I'll request for comments on the developer mailing list.

Regards.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list