diff options
author | verigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee> | 2009-06-19 10:08:15 +0000 |
---|---|---|
committer | verigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee> | 2009-06-19 10:08:15 +0000 |
commit | e53c40ec202bbad3d47e81f132f9521b417db106 (patch) | |
tree | 8ccd70584d85d8432f9789c436448cbaacf30e2c /fuse.py | |
parent | d7283a6e8f1f18c6e74229dd4979b68924f446cf (diff) | |
download | fusepy-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.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |