we don' need to calculate the size of a symlink.
This commit is contained in:
@@ -299,7 +299,6 @@ def dir_size(dir):
|
|||||||
def sizes():
|
def sizes():
|
||||||
for root, dirs, files in os.walk(dir):
|
for root, dirs, files in os.walk(dir):
|
||||||
yield sum([os.path.getsize(join_path(root, name)) for name in files if not os.path.islink(join_path(root, name))])
|
yield sum([os.path.getsize(join_path(root, name)) for name in files if not os.path.islink(join_path(root, name))])
|
||||||
yield sum([long(len(os.readlink((join_path(root, name))))) for name in files if os.path.islink(join_path(root, name))])
|
|
||||||
return sum(sizes())
|
return sum(sizes())
|
||||||
|
|
||||||
def copy_file(src,dest):
|
def copy_file(src,dest):
|
||||||
|
|||||||
Reference in New Issue
Block a user