5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-07 17:18:03 +03:00

gc: fix ignoring if lost+found can't be accessed

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>

Fixes: e2516f61a860eae59395a3a990d9abe4c445ce8c
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Hannes Laimer 2023-09-12 11:18:49 +02:00 committed by Fabian Grünbichler
parent 5b16dffcf2
commit 0d69dcb497

View File

@ -874,7 +874,7 @@ impl DataStore {
(Some(inner), None) => bail!("unexpected error on datastore traversal: {inner}"),
};
if inner.kind() == io::ErrorKind::PermissionDenied {
if err.depth() == 0 && path.ends_with("lost+found") {
if err.depth() <= 1 && path.ends_with("lost+found") {
// allow skipping ext4 fsck-directory on EPERM only, otherwise we might prune
// too many chunks. E.g., if users messed up with owner/perms on a rsync
return Ok(());