<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>99445</bug_id>
          
          <creation_ts>2012-10-16 03:26:37 -0700</creation_ts>
          <short_desc>[Qt][WK2] REGRESSION(r131428): cookies.db created on wrong place</short_desc>
          <delta_ts>2012-10-26 01:24:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>420+</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>89666</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="János Badics">jbadics</assigned_to>
          <cc>beidson</cc>
    
    <cc>hausmann</cc>
    
    <cc>jbadics</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>ossy</cc>
    
    <cc>szledan</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>743028</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-10-16 03:26:37 -0700</bug_when>
    <thetext>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 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>750774</commentid>
    <comment_count>1</comment_count>
      <attachid>170638</attachid>
    <who name="János Badics">jbadics</who>
    <bug_when>2012-10-25 07:00:27 -0700</bug_when>
    <thetext>Created attachment 170638
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&apos;t look very professional.
Consider this patch as a first step</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751642</commentid>
    <comment_count>2</comment_count>
      <attachid>170638</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-10-26 00:36:06 -0700</bug_when>
    <thetext>Comment on attachment 170638
proposed patch

Yeah, this patch comes from WK2&apos;s QtDefaultDataLocation.cpp, the QString defaultDataLocation() function in particular.

Now we do things like this in various places:

    s_defaultDatabaseDirectory = defaultDataLocation() + QLatin1String(&quot;Databases&quot;);

or

    defaultDataLocation() + QLatin1String(&quot;WebpageIcons.db&quot;);

or (as you spotted) cookieStoragePath + QLatin1String(&quot;/cookies.db&quot;); 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());</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751647</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-10-26 00:38:22 -0700</bug_when>
    <thetext>Oh, but yeah this doesn&apos;t help in the WTR case when WTR sets properties like m_overrideLocalStorageDirectory</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751650</commentid>
    <comment_count>4</comment_count>
      <attachid>170638</attachid>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2012-10-26 00:41:23 -0700</bug_when>
    <thetext>Comment on attachment 170638
proposed patch

Ok, so since this patch can also come directly through the WK2 C API we have to protect this end. I don&apos;t think a double-slash hurts, so let&apos;s go for this :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751662</commentid>
    <comment_count>5</comment_count>
    <who name="János Badics">jbadics</who>
    <bug_when>2012-10-26 01:02:39 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 170638 [details])
&gt; Ok, so since this patch can also come directly through the WK2 C API we have to protect this end. I don&apos;t think a double-slash hurts, so let&apos;s go for this :)

Thank you for the comments, I&apos;m looking into it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751676</commentid>
    <comment_count>6</comment_count>
      <attachid>170638</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-26 01:24:38 -0700</bug_when>
    <thetext>Comment on attachment 170638
proposed patch

Clearing flags on attachment: 170638

Committed r132583: &lt;http://trac.webkit.org/changeset/132583&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>751677</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-26 01:24:42 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>170638</attachid>
            <date>2012-10-25 07:00:27 -0700</date>
            <delta_ts>2012-10-26 01:24:38 -0700</delta_ts>
            <desc>proposed patch</desc>
            <filename>cookiesdb_dumbpatch_0_changelog.patch</filename>
            <type>text/plain</type>
            <size>1405</size>
            <attacher name="János Badics">jbadics</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJDb3JlL0No
YW5nZUxvZwppbmRleCA2MGI0MWZmLi42MWNiNGY0IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29y
ZS9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTUg
QEAKKzIwMTItMTAtMjUgIErDoW5vcyBCYWRpY3MgIDxqYmFkaWNzQG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