Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe40b03

Browse files
tmpfs: backport fix from pyfuse3
1 parent 5569286 commit fe40b03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/tmpfs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ def lookup(self, inode_p, name, ctx=None):
146146

147147

148148
def getattr(self, inode, ctx=None):
149-
row = self.get_row('SELECT * FROM inodes WHERE id=?', (inode,))
149+
try:
150+
row = self.get_row('SELECT * FROM inodes WHERE id=?', (inode,))
151+
except NoSuchRowError:
152+
raise(llfuse.FUSEError(errno.ENOENT))
150153

151154
entry = llfuse.EntryAttributes()
152155
entry.st_ino = inode

0 commit comments

Comments
 (0)