Don't scan uncompressed_objects_dir if it doesn't exist
A newly created archive-mode repository won't have a uncompressed-objects-cache directory, and uncompressed_objects_dir is -1 to flag that. The special meaning of -1 meaning "cwd" for libglnx means that the current directory was scanned as if it was an objects directory, producing unexpected results, especially if there were any two-letter files/subdirs in the current directory. Closes: #1537 Approved by: jlebon
This commit is contained in:
parent
b9fc3eaa15
commit
9199237b01
|
|
@ -1438,7 +1438,8 @@ scan_loose_devino (OstreeRepo *self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->mode == OSTREE_REPO_MODE_ARCHIVE)
|
if (self->mode == OSTREE_REPO_MODE_ARCHIVE &&
|
||||||
|
self->uncompressed_objects_dir_fd != -1)
|
||||||
{
|
{
|
||||||
if (!scan_one_loose_devino (self, self->uncompressed_objects_dir_fd, devino_cache,
|
if (!scan_one_loose_devino (self, self->uncompressed_objects_dir_fd, devino_cache,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue