13a14,21 > FOLDER_REG_NAMES = { > 'desktop': 'Desktop', > 'my documents': 'Personal', > 'my pictures': 'My Pictures', > 'my music': 'My Music', > 'my videos': 'My Videos' > } > 26c34 < if foldername.lower() in ["desktop", "my documents", "my pictures", "my music", "my videos"]: --- > if foldername.lower() in FOLDER_REG_NAMES.keys(): 28,37c36,40 < foldername = " ".join([ i.capitalize() for i in foldername.split(" ") ]) < path_appdata = registry.get('HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment', 'APPDATA') < if path_appdata == None: < # If the APPDATA environment variable isn't set for some reason < # we'll try composing it ourselves. Note that this might not < # work well with usernames with non-ascii characters. < path_user = util.wintounix('C:\\windows\\profiles\\%s' % os.environ['USER']) < else: < path_user = "/".join(path_appdata[3:].split("\\")[:-1]) < folderpath = "%s/drive_c/%s/%s" % (os.environ['WINEPREFIX'], path_user, foldername) --- > folder_path = registry.get('HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders', FOLDER_REG_NAMES[foldername.lower()]) > folder_path = util.wintounix(folder_path) 39c42 < os.remove(folderpath) --- > os.remove(folder_path) 42c45 < os.rmdir(folderpath) --- > os.rmdir(folder_path) 44,45c47,48 < print "Skipping %s, there are files in the directory" % os.path.basename(folderpath) < os.symlink(target, folderpath) --- > print "Skipping %s, there are files in the directory" % os.path.basename(folder_path) > os.symlink(target, folder_path)