POL_Install_PrivateUserDirs

Informations

Créateur Messages
petch

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 149402
Wine: System

Retours d'expérience

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.

Code source

#!/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:

Contribuer
Membre Messages
petch Mercredi 29 Juillet 2015 à 8:23
petch

Information

Cette mise à jour a été acceptée par l'équipe

Messages

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

Nouveau code source

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

Réponses

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com