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
Nsdateformatter - again #1765
Conversation
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]; |
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.
Couldn’t this just be [child lastScanDate]
?
Right you were @skurfer on both those occasions. Fixed :) |
It seemed right, but doesn’t appear work. Groups seem to always claim they can be indexed. This test appears to work: |
Silly to make you deal with such a small change, especially when it was already sitting here in my local copy. |
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.