Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: preserve upload lock permissions without Windows warnings

Richie McIlroy707fe9fb5da9
diff --git a/crates/recording/src/upload_resume.rs b/crates/recording/src/upload_resume.rs
index f032d56d4..81a00ffb7 100644
--- a/crates/recording/src/upload_resume.rs
+++ b/crates/recording/src/upload_resume.rs
@@ -44,12 +44,14 @@ impl UploadLock {
.parent()
.ok_or_else(|| io::Error::other("Recording has no parent directory"))?;
let directory = parent.join(".upload-locks");
- let mut builder = fs::DirBuilder::new();
+ let builder = fs::DirBuilder::new();
#[cfg(unix)]
- {
+ let builder = {
use std::os::unix::fs::DirBuilderExt;
+ let mut builder = builder;
builder.mode(0o700);
- }
+ builder
+ };
match builder.create(&directory) {
Ok(()) => {}
Err(error) if error.kind() == io::ErrorKind::AlreadyExists => {}