Changeset 797 for trunk/lib


Ignore:
Timestamp:
Jul 2, 2009, 1:37:01 AM (12 years ago)
Author:
Peter Johansson
Message:

avoid extra calls to node_exist(1) in mkdir_p(1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/utility.cc

    r796 r797  
    188188  void mkdir_p(const std::string& dir)
    189189  {
     190    if (node_exist(dir))
     191      return;
    190192    std::string mother = directory_name(dir);
    191     if (!node_exist(mother))
    192       mkdir_p(mother);
    193     if (!node_exist(dir))
    194       mkdir(dir);
     193    mkdir_p(mother);
     194    mkdir(dir);
    195195  }
    196196
Note: See TracChangeset for help on using the changeset viewer.