fix regression tests
This commit is contained in:
parent
90461b76fb
commit
2631e57d20
@ -261,6 +261,11 @@ impl MediaCatalog {
|
|||||||
.truncate(true)
|
.truncate(true)
|
||||||
.open(&tmp_path)?;
|
.open(&tmp_path)?;
|
||||||
|
|
||||||
|
if cfg!(test) {
|
||||||
|
// We cannot use chown inside test environment (no permissions)
|
||||||
|
return Ok(file);
|
||||||
|
}
|
||||||
|
|
||||||
let backup_user = crate::backup::backup_user()?;
|
let backup_user = crate::backup::backup_user()?;
|
||||||
fchown(file.as_raw_fd(), Some(backup_user.uid), Some(backup_user.gid))
|
fchown(file.as_raw_fd(), Some(backup_user.uid), Some(backup_user.gid))
|
||||||
.map_err(|err| format_err!("fchown failed - {}", err))?;
|
.map_err(|err| format_err!("fchown failed - {}", err))?;
|
||||||
|
Loading…
Reference in New Issue
Block a user