POL_Install_PrivateUserDirs

Informatie

Creator Bericht
petch

Information

This installer has been approved by the team.

Informatie

Platforms:
Downloads: 146466
Wine: System

Feedbacks

Omschrijving

When Wine creates a prefix ("virtual drive"), it uses symlinks to make several user special paths (My Documents, My Pictures, etc.) point to closest equivalent Linux directory.

This is fine to allow Windows applications to manipulate user files seamlessly, but can also be annoying (game saves "escaping" the game virtual drive, and littering your Linux directories with files and directories.

This function replace all the virtual drive's symlinks with plain directories, so that everything in C: drive is stored inside the virtual drive directories.

Broncode

#!/bin/bash
# Date : (2013-04-28 18-36)
# Last revision : (2013-04-28 18-36)
# Author : petch
# Only For : http://www.playonlinux.com


# Just to be on the safe side
[ -n "$WINEPREFIX" ] || POL_Debug_Fatal "POL_Function_PrivateUserDirs: Variable WINEPREFIX not set!"

find "$WINEPREFIX/drive_c/" -type l -exec sh -c 'echo "fixing {}"; rm "{}"; mkdir "{}"; touch "{}/.fixed"' \;

Contributions

Filters:

Contribute
Member Bericht
petch Woensdag 29 Juli 2015 om 8:23
petch

Information

This update has been approved by the team.

Bericht

Create an hidden empty file in the private directories so they aren't reverted with next Wine version changes (https://www.playonlinux.com/en/topic-13310.html)

Differences

@@ -8,4 +8,4 @@
 # Just to be on the safe side
 [ -n "$WINEPREFIX" ] || POL_Debug_Fatal "POL_Function_PrivateUserDirs: Variable WINEPREFIX not set!"
 
-find "$WINEPREFIX/drive_c/" -type l -exec sh -c 'echo "fixing {}"; rm "{}"; mkdir "{}"' \;
+find "$WINEPREFIX/drive_c/" -type l -exec sh -c 'echo "fixing {}"; rm "{}"; mkdir "{}"; touch "{}/.fixed"' \;

New source code

#!/bin/bash
# Date : (2013-04-28 18-36)
# Last revision : (2013-04-28 18-36)
# Author : petch
# Only For : http://www.playonlinux.com


# Just to be on the safe side
[ -n "$WINEPREFIX" ] || POL_Debug_Fatal "POL_Function_PrivateUserDirs: Variable WINEPREFIX not set!"

find "$WINEPREFIX/drive_c/" -type l -exec sh -c 'echo "fixing {}"; rm "{}"; mkdir "{}"; touch "{}/.fixed"' \;

Antwoorden