POL_Install_PrivateUserDirs

Informations

Creator Wiadmości
petch

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 149037
Wine: System

Feedbacks

Description

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.

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"' \;

Contributions

Filters:

Contribute
Member Wiadmości
petch Wednesday 29 July 2015 at 8:23
petch

Information

This update has been approved by the team.

Wiadmości

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"' \;

Odpowiedzi