Possible fix for occasional send to device failures on windows

This commit is contained in:
Kovid Goyal 2008-05-30 09:09:31 -07:00
parent ce43482952
commit b13d51c837

View File

@ -330,6 +330,7 @@ class PRS505(Device):
def put_file(self, infile, path, replace_file=False, end_session=True): def put_file(self, infile, path, replace_file=False, end_session=True):
path = self.munge_path(path) path = self.munge_path(path)
path = path.replace('/', os.sep)
if os.path.isdir(path): if os.path.isdir(path):
path = os.path.join(path, infile.name) path = os.path.join(path, infile.name)
if not replace_file and os.path.exists(path): if not replace_file and os.path.exists(path):