summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/base.py2
-rw-r--r--fs/tests/__init__.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/base.py b/fs/base.py
index b112c64..c1c363d 100644
--- a/fs/base.py
+++ b/fs/base.py
@@ -790,7 +790,7 @@ class FS(object):
if not data:
progress_callback(0)
- self.createfile(path)
+ self.createfile(path, wipe=True)
finished_callback()
return 0
diff --git a/fs/tests/__init__.py b/fs/tests/__init__.py
index aac08ce..9fd3cda 100644
--- a/fs/tests/__init__.py
+++ b/fs/tests/__init__.py
@@ -152,6 +152,8 @@ class FSTestCases(object):
b("to you, good sir!")), chunk_size=2)
self.assertEquals(self.fs.getcontents(
"hello", "rb"), b("to you, good sir!"))
+ self.fs.setcontents("hello", "", "wb")
+ self.assertEquals(self.fs.getcontents("hello", "rb"), "")
def test_setcontents_async(self):
# setcontents() should accept both a string...