diff options
author | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-10-04 01:19:40 +0000 |
---|---|---|
committer | rfkelly0 <rfkelly0@67cdc799-7952-0410-af00-57a81ceafa0f> | 2010-10-04 01:19:40 +0000 |
commit | 6d6533d4d424bf835cebab0cfaefacadcba8ab85 (patch) | |
tree | 7ccdf4ce137b26b3b13fc18b472d601098efe26c /fs/expose | |
parent | f5cbd2fd2e0836445e58372e8620125b9704e9c3 (diff) | |
download | pyfilesystem-git-6d6533d4d424bf835cebab0cfaefacadcba8ab85.tar.gz |
FUSE: let info["size"] override info["st_size"] is present
Diffstat (limited to 'fs/expose')
-rw-r--r-- | fs/expose/fuse/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/expose/fuse/__init__.py b/fs/expose/fuse/__init__.py index abb5a60..d81776e 100644 --- a/fs/expose/fuse/__init__.py +++ b/fs/expose/fuse/__init__.py @@ -406,7 +406,10 @@ class FSOperations(Operations): info[key1] = STARTUP_TIME # Ensure the reported size reflects any writes performed, even if # they haven't been flushed to the filesystem yet. - info.setdefault("st_size",info.get("size",1024)) + if "size" in info: + info["st_size"] = info["size"] + elif "st_size" not in info: + info["st_size"] = 0 try: written_sizes = self._files_size_written[path] except KeyError: |