We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b381d6e commit 9b8e061Copy full SHA for 9b8e061
stag
@@ -823,6 +823,12 @@ class StagFS(Operations):
823
else:
824
tags = ""
825
826
+ # the user might be trying to create a file with the same name as another file, but in a different subfolder
827
+ # this wouldn't trigger a conflict in getattr and it would still call create
828
+ # here we double check to make sure no such file exist and avoid creating duplicates
829
+ if os.path.exists(real_path):
830
+ raise FuseOSError(errno.EEXIST)
831
+
832
# add the file to the database
833
self.cur.execute(f"INSERT INTO files VALUES ('{basename}', '{tags}')")
834
self.con.commit()
0 commit comments