Two more syspath calls

This commit is contained in:
Adrian Sampson 2022-01-05 16:15:39 -08:00
parent bb13f37e59
commit 686838856a
No known key found for this signature in database
GPG key ID: BDB93AB409CC8705

View file

@ -479,9 +479,9 @@ def move(path, dest, replace=False):
instead, in which case metadata will *not* be preserved. Paths are
translated to system paths.
"""
if os.path.isdir(path):
if os.path.isdir(syspath(path)):
raise FilesystemError(u'source is directory', 'move', (path, dest))
if os.path.isdir(dest):
if os.path.isdir(syspath(dest)):
raise FilesystemError(u'destination is directory', 'move',
(path, dest))
if samefile(path, dest):