Skip to content

Commit e157d93

Browse files
committed
uses validated paths in copydir
1 parent 2e0238a commit e157d93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,11 +465,11 @@ def copydir(
465465
_dst_path = self.validatepath(dst_path)
466466
if isbase(_src_path, _dst_path):
467467
raise errors.IllegalDestination(dst_path)
468-
if not create and not self.exists(dst_path):
468+
if not create and not self.exists(_dst_path):
469469
raise errors.ResourceNotFound(dst_path)
470-
if not self.getinfo(src_path).is_dir:
470+
if not self.getinfo(_src_path).is_dir:
471471
raise errors.DirectoryExpected(src_path)
472-
copy.copy_dir(self, src_path, self, dst_path, preserve_time=preserve_time)
472+
copy.copy_dir(self, _src_path, self, _dst_path, preserve_time=preserve_time)
473473

474474
def create(self, path, wipe=False):
475475
# type: (Text, bool) -> bool

0 commit comments

Comments
 (0)