-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add ordered directory traversal #34
base: master
Are you sure you want to change the base?
Conversation
3fb016c
to
7eca83d
Compare
7eca83d
to
24fb6b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not involved in the development of genext2fs but you asked for a review so here you have it.
My only other suggestion would be to add a unit test that uses disorderfs to show that your patch works.
off_t filesize; | ||
|
||
if(!(dh = opendir("."))) | ||
if((numdirs = scandir(".", &dents, NULL, alphasort)) == -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphasort
is locale aware. You need to set LC_COLLATE
to a fixed value like C
to produce the same output independent of the user's locale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The man page states that this is already the default behavior. Would you rather make it explicit?
...
On startup of the main program, the portable "C" locale is selected as default.
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right!
Here is an idea how a test for this feature could look like:
As expected, the images differ without your patch and they are identical with your patch. |
@josch :
Yes but you're more active than me; I'd really like to handle you maintainership of genext2fs. Or at the very least nominate you co-maintainer as github settings permit. @mpolitzer sorry for the OT rant |
24fb6b1
to
1f38ba4
Compare
No problem |
5a48e85
to
8d9d322
Compare
8d9d322
to
84c2d01
Compare
52cd773
to
84c2d01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me now.
@bestouff after merging this, could you tag a new release?
bump |
No description provided.