Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def removexattr(self, id_, name, ctx):
log.debug('started with %d, %r', id_, name)
if self.failsafe or self.inodes[id_].locked:
raise FUSEError(errno.EPERM)
try:
name_id = self._del_name(name)
except NoSuchRowError:
raise FUSEError(pyfuse3.ENOATTR)
changes = self.db.execute('DELETE FROM ext_attributes WHERE inode=? AND name_id=?',
(id_, name_id))
if changes == 0:
raise FUSEError(pyfuse3.ENOATTR)
self.inodes[id_].ctime_ns = time_ns()