RESOLVED FIXED 99445
[Qt][WK2] REGRESSION(r131428): cookies.db created on wrong place
https://bugs.webkit.org/show_bug.cgi?id=99445
Summary [Qt][WK2] REGRESSION(r131428): cookies.db created on wrong place
Csaba Osztrogonác
Reported 2012-10-16 03:26:37 PDT
Everything created in the dir named /tmp/WebKitTestRunner-cQBEjz like this, but cookies.db is /tmp/WebKitTestRunner-cQBEjzcookies.db It seems a slash is missing somewhere .
Attachments
proposed patch (1.37 KB, patch)
2012-10-25 07:00 PDT, János Badics
no flags
János Badics
Comment 1 2012-10-25 07:00:27 PDT
Created attachment 170638 [details] proposed patch There is a missing slash in CookieJarQt.cpp. I have added a slash there but I suppose that there would be some more elegant solutions because adding a slash directly doesn't look very professional. Consider this patch as a first step
Simon Hausmann
Comment 2 2012-10-26 00:36:06 PDT
Comment on attachment 170638 [details] proposed patch Yeah, this patch comes from WK2's QtDefaultDataLocation.cpp, the QString defaultDataLocation() function in particular. Now we do things like this in various places: s_defaultDatabaseDirectory = defaultDataLocation() + QLatin1String("Databases"); or defaultDataLocation() + QLatin1String("WebpageIcons.db"); or (as you spotted) cookieStoragePath + QLatin1String("/cookies.db"); where cookieStoragePath comes from the same function (through several levels of indirection). I suggest to harden defaultDataLocation() instead and at the end of the function make sure that the path ends with a separator, i.e. if (!s_dataLocation.endsWith(QDir::separator()) s_dataLocation.append(QDir::separator());
Simon Hausmann
Comment 3 2012-10-26 00:38:22 PDT
Oh, but yeah this doesn't help in the WTR case when WTR sets properties like m_overrideLocalStorageDirectory
Simon Hausmann
Comment 4 2012-10-26 00:41:23 PDT
Comment on attachment 170638 [details] proposed patch Ok, so since this patch can also come directly through the WK2 C API we have to protect this end. I don't think a double-slash hurts, so let's go for this :)
János Badics
Comment 5 2012-10-26 01:02:39 PDT
(In reply to comment #4) > (From update of attachment 170638 [details]) > Ok, so since this patch can also come directly through the WK2 C API we have to protect this end. I don't think a double-slash hurts, so let's go for this :) Thank you for the comments, I'm looking into it.
WebKit Review Bot
Comment 6 2012-10-26 01:24:38 PDT
Comment on attachment 170638 [details] proposed patch Clearing flags on attachment: 170638 Committed r132583: <http://trac.webkit.org/changeset/132583>
WebKit Review Bot
Comment 7 2012-10-26 01:24:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.