Init guard also counts snapshots in the trash and the catalog as backup data

This commit is contained in:
2026-10-21 22:42:43 +02:00
parent 9bc4e4a4ab
commit 2616b6e543
+1 -1
View File
@@ -75,7 +75,7 @@ final class Repository {
// No config, but backup data: the config is missing (or could not be seen just now, a
// connection that failed). A new repository here would write a config over the one that
// opens this data; refuse instead.
foreach (['index', 'snapshots'] as $dir) {
foreach (['index', 'snapshots', 'trash/snapshots', 'catalog'] as $dir) {
if ($backend->listFiles($dir) !== []) {
throw new RepositoryException("This location holds backup data ($dir/) but no repository config could be read: not creating a new repository over it. Check the connection and the folder; a missing config can be restored from the recovery kit.");
}