Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m
branchadium-1.5.10
changeset 5844 aed198ae15cb
parent 5750 dad5f3048dc3
child 5889 a36d15e8612a
--- a/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m	Fri Feb 21 12:39:21 2014 +0100
+++ b/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m	Fri Feb 21 13:15:39 2014 +0100
@@ -30,12 +30,12 @@
 	formatter.timeSeparator = '.';
 	NSRange openParenRange, closeParenRange;
 	
-	if ([pathToFile hasSuffix:@".chatlog"] && (openParenRange = [pathToFile rangeOfString:@"(" options:NSBackwardsSearch]).location != NSNotFound) {
+	if ((openParenRange = [pathToFile rangeOfString:@"(" options:NSBackwardsSearch]).location != NSNotFound) {
 		openParenRange = NSMakeRange(openParenRange.location, [pathToFile length] - openParenRange.location);
 		if ((closeParenRange = [pathToFile rangeOfString:@")" options:0 range:openParenRange]).location != NSNotFound) {
 			//Add and subtract one to remove the parenthesis
 			NSString *dateString = [pathToFile substringWithRange:NSMakeRange(openParenRange.location + 1, (closeParenRange.location - openParenRange.location))];
-			return [formatter dateFromString:dateString];
+			return [formatter dateFromString:[dateString stringByReplacingOccurrencesOfString:@"|" withString:@"-"]];
 		}
 	}
 	return nil;