Skip to content

Commit 5456cf6

Browse files
committed
still need drivedrop around paramiko normalize calls
1 parent dd60287 commit 5456cf6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sftpretty/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def _sftp_channel(self):
329329
self._cache.__dict__.setdefault('cwd', self._default_path)
330330

331331
if self._cache.cwd is None:
332-
self._cache.cwd = channel.normalize('.')
332+
self._cache.cwd = drivedrop(channel.normalize('.'))
333333

334334
channel.chdir(self._cache.cwd)
335335
log.info(f'Current Working Directory: [{self._cache.cwd}]')
@@ -1195,7 +1195,7 @@ def chdir(self, remotepath):
11951195
'''
11961196
with self._sftp_channel() as channel:
11971197
channel.chdir(drivedrop(remotepath))
1198-
self._cache.cwd = channel.normalize('.')
1198+
self._cache.cwd = drivedrop(channel.normalize('.'))
11991199

12001200
def chmod(self, remotepath, mode=700):
12011201
'''Set the permission mode of a remotepath, where mode is an octal.
@@ -1435,7 +1435,7 @@ def normalize(self, remotepath):
14351435
with self._sftp_channel() as channel:
14361436
absolute = channel.normalize(drivedrop(remotepath))
14371437

1438-
return absolute
1438+
return drivedrop(absolute)
14391439

14401440
def open(self, remotefile, bufsize=-1, mode='r'):
14411441
'''Open a file on the remote server.
@@ -1619,7 +1619,7 @@ def pwd(self):
16191619
:returns: (str) Current working directory.
16201620
'''
16211621
with self._sftp_channel() as channel:
1622-
self._cache.cwd = channel.normalize('.')
1622+
self._cache.cwd = drivedrop(channel.normalize('.'))
16231623

16241624
return self._cache.cwd
16251625

0 commit comments

Comments
 (0)