git://developer.intra2net.com
/
libi2ncommon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
854d7ee
)
fix symlink-dir-bug by switching from stat() to our Stat-class and using it's follow_...
author
Gerd von Egidy
<gerd.von.egidy@intra2net.com>
Wed, 16 Dec 2015 22:59:32 +0000 (23:59 +0100)
committer
Gerd von Egidy
<gerd.von.egidy@intra2net.com>
Wed, 16 Dec 2015 22:59:32 +0000 (23:59 +0100)
src/filefunc.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/filefunc.cpp
b/src/filefunc.cpp
index
c71b27d
..
a19d760
100644
(file)
--- a/
src/filefunc.cpp
+++ b/
src/filefunc.cpp
@@
-749,11
+749,11
@@
bool recursive_delete(const std::string &path,
try
{
- struct stat my_stat;
- if (stat(path.c_str(), &my_stat) != 0)
+ Stat sp(path, false);
+ if (!sp)
throw runtime_error("can't stat " + path);
- if (S_ISDIR(my_stat.st_mode))
+ if (sp.is_directory())
{
DIR *dir = opendir(path.c_str());
if (!dir)