mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-11 00:41:21 +00:00
xtask: the private temp folder builder is mutable only on Unix (#6712)
This commit is contained in:
1 parent
9ee213eff7
commit
9f4191336d
1 file changed
+2
@@ -332,6 +332,8 @@ impl PrivateDir {
|
||||
let nanos = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.subsec_nanos());
|
||||
for attempt in 0..100u32 {
|
||||
let path = std::env::temp_dir().join(format!("{prefix}-{}-{nanos}-{attempt}", std::process::id()));
|
||||
// Only Unix sets a mode on the builder.
|
||||
#[cfg_attr(not(unix), allow(unused_mut))]
|
||||
let mut builder = std::fs::DirBuilder::new();
|
||||
#[cfg(unix)]
|
||||
std::os::unix::fs::DirBuilderExt::mode(&mut builder, 0o700);
|
||||
|
||||
Reference in new issue
Block a user