We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e257323 + 0d84ffc commit e175bbcCopy full SHA for e175bbc
crates/spfs/src/storage/fs/database.rs
@@ -118,6 +118,15 @@ impl graph::Database for super::FSRepository {
118
err,
119
));
120
}
121
+ let perms = std::fs::Permissions::from_mode(self.objects.file_permissions);
122
+ if let Err(err) = tokio::fs::set_permissions(&working_file, perms).await {
123
+ let _ = tokio::fs::remove_file(&working_file).await;
124
+ return Err(Error::StorageWriteError(
125
+ "set permissions on object file",
126
+ working_file,
127
+ err,
128
+ ));
129
+ }
130
self.objects.ensure_base_dir(&filepath)?;
131
match tokio::fs::rename(&working_file, &filepath).await {
132
Ok(_) => Ok(()),
0 commit comments