forked from openlp/openlp
Simplify OS path setting
This commit is contained in:
parent
8da19172a7
commit
1c0a86b17f
@ -23,7 +23,6 @@
|
||||
###############################################################################
|
||||
|
||||
import os
|
||||
import string
|
||||
import logging
|
||||
import cPickle
|
||||
import zipfile
|
||||
@ -481,11 +480,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
try:
|
||||
zip = zipfile.ZipFile(unicode(filename))
|
||||
for file in zip.namelist():
|
||||
if os.name == u'nt':
|
||||
winfile = string.replace(file, '/', os.path.sep)
|
||||
names = winfile.split(os.path.sep)
|
||||
else:
|
||||
names = file.split(os.path.sep)
|
||||
osfile = unicode(QtCore.QDir.toNativeSeparators(file))
|
||||
names = osfile.split(os.path.sep)
|
||||
file_to = os.path.join(self.servicePath,
|
||||
names[len(names) - 1])
|
||||
f = open(file_to, u'wb')
|
||||
|
Loading…
Reference in New Issue
Block a user