Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't scan uncompressed_objects_dir if it doesn't exist #1537

Closed
wants to merge 1 commit into from

Conversation

owtaylor
Copy link
Contributor

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.

This fixes a regression from 88d27fb

I didn't examine the source code to see if there were any other places where uncompressed_objects_dir is used blindly.

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.
@rh-atomic-bot
Copy link

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@jlebon
Copy link
Member

jlebon commented Apr 12, 2018

Thanks! @rh-atomic-bot r+ 0afaf73

The only other place which gave me some hesitation was ostree_repo_checkout_gc, though it looks like the only way we have uncompressed dirs to clean up is if we initialized the fd to uncompress in the first place.

@owtaylor
Copy link
Contributor Author

Thanks for the review! I agree with your analysis of ostree_repo_checkout_gc.

@rh-atomic-bot
Copy link

⌛ Testing commit 0afaf73 with merge 9199237...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 9199237 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants