@@ -1171,17 +1171,19 @@ def move(self, src_path, dst_path, overwrite=False, preserve_time=False):
11711171 ``dst_path`` does not exist.
11721172
11731173 """
1174- if not overwrite and self .exists (dst_path ):
1174+ _src_path = self .validatepath (src_path )
1175+ _dst_path = self .validatepath (dst_path )
1176+ if not overwrite and self .exists (_dst_path ):
11751177 raise errors .DestinationExists (dst_path )
1176- if self .getinfo (src_path ).is_dir :
1178+ if self .getinfo (_src_path ).is_dir :
11771179 raise errors .FileExpected (src_path )
1178- if normpath ( src_path ) == normpath ( dst_path ) :
1180+ if _src_path == _dst_path :
11791181 # early exit when moving a file onto itself
11801182 return
11811183 if self .getmeta ().get ("supports_rename" , False ):
11821184 try :
1183- src_sys_path = self .getsyspath (src_path )
1184- dst_sys_path = self .getsyspath (dst_path )
1185+ src_sys_path = self .getsyspath (_src_path )
1186+ dst_sys_path = self .getsyspath (_dst_path )
11851187 except errors .NoSysPath : # pragma: no cover
11861188 pass
11871189 else :
@@ -1191,15 +1193,15 @@ def move(self, src_path, dst_path, overwrite=False, preserve_time=False):
11911193 pass
11921194 else :
11931195 if preserve_time :
1194- copy_modified_time (self , src_path , self , dst_path )
1196+ copy_modified_time (self , _src_path , self , _dst_path )
11951197 return
11961198 with self ._lock :
1197- with self .open (src_path , "rb" ) as read_file :
1199+ with self .open (_src_path , "rb" ) as read_file :
11981200 # FIXME(@althonos): typing complains because open return IO
1199- self .upload (dst_path , read_file ) # type: ignore
1201+ self .upload (_dst_path , read_file ) # type: ignore
12001202 if preserve_time :
1201- copy_modified_time (self , src_path , self , dst_path )
1202- self .remove (src_path )
1203+ copy_modified_time (self , _src_path , self , _dst_path )
1204+ self .remove (_src_path )
12031205
12041206 def open (
12051207 self ,
0 commit comments