[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
sullivan
sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:37:47 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 384f49b315d321f62e8cc0b4a11b880dadf60fe3
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 18 02:14:50 2003 +0000
Reviewed by Maciej.
* History.subproj/WebHistoryPrivate.m:
(-[WebHistoryPrivate _loadHistoryGuts:]):
if we can't load the file as a dictionary, try loading it
the old-fashioned array way. This makes the history file
format change forward-compatible.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4139 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2b925fb..1eaef19 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-17 John Sullivan <sullivan at apple.com>
+
+ Reviewed by Maciej.
+
+ * History.subproj/WebHistoryPrivate.m:
+ (-[WebHistoryPrivate _loadHistoryGuts:]):
+ if we can't load the file as a dictionary, try loading it
+ the old-fashioned array way. This makes the history file
+ format change forward-compatible.
+
2003-04-17 Chris Blumenberg <cblu at apple.com>
Fixed: 3160751 - Can't use non-'.txt' file extension for text files?
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index b2eac69..eabad0c 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -358,12 +358,22 @@ NSString *DatesArrayKey = @"WebHistoryDates";
NSDictionary *fileAsDictionary = [NSDictionary dictionaryWithContentsOfURL: [self URL]];
if (fileAsDictionary == nil) {
+ // Couldn't read a dictionary; let's see if we can read an old-style array instead
+ NSArray *fileAsArray = [NSArray arrayWithContentsOfURL:[self URL]];
+ if (fileAsArray == nil) {
#if !ERROR_DISABLED
- if ([[self URL] isFileURL] && [[NSFileManager defaultManager] fileExistsAtPath: [[self URL] path]]) {
- ERROR("unable to read history from file %@; perhaps contents are corrupted", [[self URL] path]);
- }
+ if ([[self URL] isFileURL] && [[NSFileManager defaultManager] fileExistsAtPath: [[self URL] path]]) {
+ ERROR("unable to read history from file %@; perhaps contents are corrupted", [[self URL] path]);
+ }
#endif
- return NO;
+ return NO;
+ } else {
+ // Convert old-style array into new-style dictionary
+ fileAsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
+ fileAsArray, DatesArrayKey,
+ [NSNumber numberWithInt:1], FileVersionKey,
+ nil];
+ }
}
NSNumber *fileVersionObject = [fileAsDictionary objectForKey:FileVersionKey];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list