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

Nsdateformatter - again #1765

Merged
merged 4 commits into from Feb 8, 2014
Merged

Nsdateformatter - again #1765

merged 4 commits into from Feb 8, 2014

Conversation

pjrobertson
Copy link
Member

@pjrobertson pjrobertson commented Feb 3, 2014

Dammit, so you merged the last pull in too quick @skurfer ;-)

I found another place where the NSDateFormatter was wrong - in the Scanned field of the 'attributes' tab of a catalog entry (the Prefs).
This is just a pull that changes that and adds one small change:

For Catalog Groups, if they don't have an actual .qsindex file (i.e. they're just a group and not a catalog entry) the Scanned date would show up empty. What I've done here is just use the most recent scanned date from any of the group's children.

pjrobertson added 2 commits Feb 3, 2014
To find the last scan date, use the latest scan date from its children
// It's a group entry. Loop through the child catalog entries to find the one with the latest scan date
NSDate *latestScan = nil;
for (QSCatalogEntry *child in [self children]) {
NSDate *childScanDate = [[[NSFileManager defaultManager] attributesOfItemAtPath:[child indexLocation] error:nil] objectForKey:NSFileModificationDate];
Copy link
Member

@skurfer skurfer Feb 3, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn’t this just be [child lastScanDate]?

@pjrobertson
Copy link
Member Author

@pjrobertson pjrobertson commented Feb 8, 2014

Right you were @skurfer on both those occasions. Fixed :)

@skurfer
Copy link
Member

@skurfer skurfer commented Feb 8, 2014

Right you were @skurfer on both those occasions.

It seemed right, but doesn’t appear work. Groups seem to always claim they can be indexed.

This test appears to work: if ([[self type] isEqualToString:@"Group"])

skurfer added a commit that referenced this issue Feb 8, 2014
@skurfer skurfer merged commit b9979bf into master Feb 8, 2014
1 check was pending
@skurfer skurfer deleted the nsdateformatter branch Feb 8, 2014
@skurfer
Copy link
Member

@skurfer skurfer commented Feb 8, 2014

Silly to make you deal with such a small change, especially when it was already sitting here in my local copy. 😃

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

2 participants