]> git.proxmox.com Git - proxmox-backup.git/commitdiff
gc: fix ignoring if `lost+found` can't be accessed
authorHannes Laimer <h.laimer@proxmox.com>
Tue, 12 Sep 2023 09:18:49 +0000 (11:18 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 12 Sep 2023 09:26:36 +0000 (11:26 +0200)
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Fixes: e2516f61a860eae59395a3a990d9abe4c445ce8c
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
pbs-datastore/src/datastore.rs

index d0c2b90a0b7611a481206e5e5ceb596e032fe750..cc7a39bdb5af9cb8dcc61c41f4cd9f1139a67a23 100644 (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(());