<?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>171268</bug_id>
          
          <creation_ts>2017-04-25 03:36:15 -0700</creation_ts>
          <short_desc>Rename MockFileSystem.maybe_make_directory()</short_desc>
          <delta_ts>2017-04-25 08:57:30 -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>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=168036</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Alberto Lopez Perez">clopez</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>lforschler</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1300958</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-04-25 03:36:15 -0700</bug_when>
    <thetext>The name maybe_make_directory is pretty confusing as it suggest the function may fail to create the directory.

The function is this:


    def maybe_make_directory(self, *path):
        norm_path = self.normpath(self.join(*path))
        while norm_path and not self.isdir(norm_path):
            self.dirs.add(norm_path)
            norm_path = self.dirname(norm_path)

https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py?rev=215715#L279

So I understand it behaves exactly like &quot;mkdir -p&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1301000</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-04-25 07:29:05 -0700</bug_when>
    <thetext>Hm, this is not what I meant. I assumed it was obvious that maybe_make_directory() functions like &quot;mkdir -p&quot;. So I think the current name is fine. But we should have a function that operates like plain &quot;mkdir&quot; so that you can use it in tests in cases where the directory should definitely not already exist, as in bug #168036.

This is very unimportant. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1301044</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Alberto Lopez Perez">clopez</who>
    <bug_when>2017-04-25 08:57:30 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; Hm, this is not what I meant. I assumed it was obvious that
&gt; maybe_make_directory() functions like &quot;mkdir -p&quot;. So I think the current
&gt; name is fine. 
&gt; But we should have a function that operates like plain &quot;mkdir&quot;
&gt; so that you can use it in tests in cases where the directory should
&gt; definitely not already exist, as in bug #168036.
&gt; 

I don&apos;t think we need such function. If I want to ensure the directory doesn&apos;t exits I can test for that with MockFileSystem.isdir()

I&apos;ll land a follow-up patch for that in bug 168036.


&gt; This is very unimportant. :)

Ok. Let&apos;s close this then.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>