summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2009-11-23 18:31:59 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2009-11-23 18:31:59 +0000
commit66c06ddcd27ff1c187b898ca2735f644ec1ae4d2 (patch)
treeaa12bc81a5c0a89f99ecf28cc9163ba0c27b8b73
parent29de3fba3839a21cb099c1144820bdca1e50e376 (diff)
downloadpyfilesystem-66c06ddcd27ff1c187b898ca2735f644ec1ae4d2.tar.gz
Fixed an issue caused by change to getsyspath
git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@283 67cdc799-7952-0410-af00-57a81ceafa0f
-rw-r--r--fs/utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/utils.py b/fs/utils.py
index fb1ffbb..ab91ea3 100644
--- a/fs/utils.py
+++ b/fs/utils.py
@@ -18,8 +18,8 @@ def copyfile(src_fs, src_path, dst_fs, dst_path, chunk_size=16384):
chunk_size -- Size of chunks to move if system copyfile is not available (default 16K)
"""
- src_syspath = src_fs.getsyspath(src_path, default="")
- dst_syspath = dst_fs.getsyspath(dst_path, default="")
+ src_syspath = src_fs.getsyspath(src_path) or ""
+ dst_syspath = dst_fs.getsyspath(dst_path) or ""
# System copy if there are two sys paths
if src_syspath and dst_syspath:
@@ -57,8 +57,8 @@ def movefile(src_fs, src_path, dst_fs, dst_path, chunk_size=16384):
chunk_size -- Size of chunks to move if system copyfile is not available (default 16K)
"""
- src_syspath = src_fs.getsyspath(src_path, default="")
- dst_syspath = dst_fs.getsyspath(dst_path, default="")
+ src_syspath = src_fs.getsyspath(src_path) or ""
+ dst_syspath = dst_fs.getsyspath(dst_path) or ""
# System copy if there are two sys paths
if src_syspath and dst_syspath:
@@ -244,3 +244,4 @@ if __name__ == "__main__":
fs = OSFS('~/duptest')
for files in find_duplicates(fs, quick=False):
print files
+