summaryrefslogtreecommitdiff
path: root/fuse.py
diff options
context:
space:
mode:
authorverigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee>2009-06-19 10:08:15 +0000
committerverigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee>2009-06-19 10:08:15 +0000
commite53c40ec202bbad3d47e81f132f9521b417db106 (patch)
tree8ccd70584d85d8432f9789c436448cbaacf30e2c /fuse.py
parentd7283a6e8f1f18c6e74229dd4979b68924f446cf (diff)
downloadfusepy-e53c40ec202bbad3d47e81f132f9521b417db106.tar.gz
There is an incombatibility between Linux and Mac OS X concerning st_nlink of
directories. Mac OS X counts all files inside the directory, while Linux counts only the subdirectories. Changed the examples to follow Linux, but in general it should be harmless. [thanks to Jim Wilcoxson for spotting it] git-svn-id: http://fusepy.googlecode.com/svn/trunk@19 1ebed218-b0a3-11dd-8075-91d349ce83ee
Diffstat (limited to 'fuse.py')
-rw-r--r--fuse.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/fuse.py b/fuse.py
index 4897e1d..9f7a99b 100644
--- a/fuse.py
+++ b/fuse.py
@@ -475,7 +475,11 @@ class Operations:
def getattr(self, path, fh=None):
"""Returns a dictionary with keys identical to the stat C structure
of stat(2).
- st_atime, st_mtime and st_ctime should be floats."""
+ st_atime, st_mtime and st_ctime should be floats.
+ NOTE: There is an incombatibility between Linux and Mac OS X concerning
+ st_nlink of directories. Mac OS X counts all files inside the directory,
+ while Linux counts only the subdirectories."""
+
if path != '/':
raise OSError(ENOENT, '')
return dict(st_mode=(S_IFDIR | 0755), st_nlink=2)