mirror of
https://github.com/Syncplay/syncplay
synced 2024-12-16 20:04:42 +00:00
Use normpath in _tryToFillPlayerPath to avoid doubleslash problems
This commit is contained in:
parent
45b17a8d5b
commit
2c454d2ade
@ -79,7 +79,7 @@ class ConfigDialog(QtGui.QDialog):
|
||||
settings = QSettings("Syncplay", "MediaBrowseDialog")
|
||||
settings.beginGroup("PlayerList")
|
||||
savedPlayers = settings.value("PlayerList", [])
|
||||
playerpathlist = list(set([os.path.normcase(path) for path in set(playerpathlist + savedPlayers)]))
|
||||
playerpathlist = list(set([os.path.normcase(os.path.normpath(path)) for path in set(playerpathlist + savedPlayers)]))
|
||||
settings.endGroup()
|
||||
foundpath = ""
|
||||
|
||||
@ -94,15 +94,15 @@ class ConfigDialog(QtGui.QDialog):
|
||||
self.executablepathCombobox.addItem(foundpath)
|
||||
|
||||
for path in playerpathlist:
|
||||
if(os.path.isfile(path) and os.path.normcase(path) != os.path.normcase(foundpath)):
|
||||
if(os.path.isfile(path) and os.path.normcase(os.path.normpath(path)) != os.path.normcase(os.path.normpath(foundpath))):
|
||||
self.executablepathCombobox.addItem(path)
|
||||
if foundpath == "":
|
||||
foundpath = path
|
||||
|
||||
if foundpath != "":
|
||||
settings.beginGroup("PlayerList")
|
||||
playerpathlist.append(os.path.normcase(foundpath))
|
||||
settings.setValue("PlayerList", list(set([os.path.normcase(path) for path in set(playerpathlist)])))
|
||||
playerpathlist.append(os.path.normcase(os.path.normpath(foundpath)))
|
||||
settings.setValue("PlayerList", list(set([os.path.normcase(os.path.normpath(path)) for path in set(playerpathlist)])))
|
||||
settings.endGroup()
|
||||
return(foundpath)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user