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 .
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
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());
Oh, but yeah this doesn't help in the WTR case when WTR sets properties like m_overrideLocalStorageDirectory
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 :)
(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.
Comment on attachment 170638 [details] proposed patch Clearing flags on attachment: 170638 Committed r132583: <http://trac.webkit.org/changeset/132583>
All reviewed patches have been landed. Closing bug.