projects
/
libs
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
154d5f4
)
Do less syscalls in mkpath
author
Mikko Rasa
<tdb@tdb.fi>
Sun, 15 Jul 2012 12:05:32 +0000
(15:05 +0300)
committer
Mikko Rasa
<tdb@tdb.fi>
Sun, 15 Jul 2012 12:05:32 +0000
(15:05 +0300)
source/fs/dir.cpp
patch
|
blob
|
history
diff --git
a/source/fs/dir.cpp
b/source/fs/dir.cpp
index ea0cd952b5a77ad159d625664f6d0ed8991900d4..f7f34f668492383087c78ddb4f2627a4e551e38e 100644
(file)
--- a/
source/fs/dir.cpp
+++ b/
source/fs/dir.cpp
@@
-84,9
+84,9
@@
void mkpath(const Path &path, int mode)
if(p.size()==1 && p.is_absolute())
continue;
#endif
- if(
exists
(p))
+ if(
FS::Stat st = stat
(p))
{
- if(!
is_dir(p
))
+ if(!
st.is_directory(
))
throw not_a_directory(p);
continue;
}