Localized Desktop folder fix

XDG_DESKTOP_DIR contains environment variable which is not automatically expanded by Python
`XDG_DESKTOP_DIR="$HOME/Bureau"`
We have to use os.path.expandvars
This commit is contained in:
Maxime-J 2015-07-30 18:28:26 +02:00 committed by Maxime-J
parent f5f770dc8e
commit 1350f8072a

View File

@ -181,7 +181,7 @@ class pluginclass( object ):
from configobj import ConfigObj
config = ConfigObj(home + "/.config/user-dirs.dirs")
tmpdesktopDir = config['XDG_DESKTOP_DIR']
if os.path.exists(tmpdesktopDir):
if os.path.exists(os.path.expandvars(tmpdesktopDir)):
desktopDir = tmpdesktopDir
except Exception, detail:
print detail