mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 04:32:15 +00:00
Fix path trimming for copytree
This commit is contained in:
1 parent
672f4a03f2
commit
4607f9ebb0
1 file changed
+2
-2
+2
-2
@@ -385,7 +385,7 @@ def copytree(src, dst, verbose=0, symlinks=False):
|
||||
"""
|
||||
|
||||
if verbose == -1:
|
||||
verbose = len(os.path.abspath(dst)) - 1
|
||||
verbose = len(os.path.abspath(dst)) + 1
|
||||
names = os.listdir(src)
|
||||
# os.makedirs(dst)
|
||||
_mkdir(dst) # XXX
|
||||
@@ -402,7 +402,7 @@ def copytree(src, dst, verbose=0, symlinks=False):
|
||||
else:
|
||||
shutil.copy2(srcname, dstname)
|
||||
if verbose > 0:
|
||||
print os.path.abspath(srcname)[verbose:]
|
||||
print os.path.abspath(dstname)[verbose:]
|
||||
# XXX What about devices, sockets etc.?
|
||||
except (IOError, os.error), why:
|
||||
errors.append((srcname, dstname, str(why)))
|
||||
|
||||
Reference in new issue
Block a user