aboutsummaryrefslogtreecommitdiff
path: root/butl/filesystem.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'butl/filesystem.cxx')
-rw-r--r--butl/filesystem.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/butl/filesystem.cxx b/butl/filesystem.cxx
index e5819e2..a807f4c 100644
--- a/butl/filesystem.cxx
+++ b/butl/filesystem.cxx
@@ -35,7 +35,7 @@ using namespace std;
namespace butl
{
bool
- dir_exists (const path& p)
+ file_exists (const path& p)
{
#ifndef _WIN32
struct stat s;
@@ -51,11 +51,11 @@ namespace butl
throw system_error (errno, system_category ());
}
- return S_ISDIR (s.st_mode);
+ return S_ISREG (s.st_mode);
}
bool
- file_exists (const path& p)
+ dir_exists (const path& p)
{
#ifndef _WIN32
struct stat s;
@@ -71,7 +71,7 @@ namespace butl
throw system_error (errno, system_category ());
}
- return S_ISREG (s.st_mode);
+ return S_ISDIR (s.st_mode);
}
mkdir_status