mirror of
https://codeberg.org/demostf/backup.git
synced 2026-06-03 09:54:18 +02:00
explicitly set permissions
This commit is contained in:
parent
6a1851eae7
commit
2c6c1961ca
1 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
use md5::Context;
|
use md5::Context;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::fs::File;
|
use std::fs::{File, Permissions};
|
||||||
use std::io::{ErrorKind, Read, Write};
|
use std::io::{ErrorKind, Read, Write};
|
||||||
|
use std::os::unix::fs::PermissionsExt;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
pub struct Store {
|
pub struct Store {
|
||||||
|
|
@ -37,6 +38,7 @@ impl Store {
|
||||||
context.consume(data);
|
context.consume(data);
|
||||||
|
|
||||||
file.write_all(data)?;
|
file.write_all(data)?;
|
||||||
|
file.set_permissions(Permissions::from_mode(0o644))?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue