[Saga-devel] saga SVN commit 3308: /trunk/adaptors/default/file/
amerzky at cct.lsu.edu
amerzky at cct.lsu.edu
Fri Jan 16 10:21:25 CST 2009
User: amerzky
Date: 2009/01/16 10:21 AM
Modified:
/trunk/adaptors/default/file/
default_dir.cpp
Log:
same mkdir fix again - thanks Hartmut for pointing out
A
File Changes:
Directory: /trunk/adaptors/default/file/
========================================
File [modified]: default_dir.cpp
Delta lines: +12 -6
===================================================================
--- trunk/adaptors/default/file/default_dir.cpp 2009-01-16 07:02:09 UTC (rev 3307)
+++ trunk/adaptors/default/file/default_dir.cpp 2009-01-16 16:21:16 UTC (rev 3308)
@@ -123,13 +123,19 @@
{
try {
// create directory, if needed
- if ((OpenMode & saga::filesystem::CreateParents) && !fs::create_directories (path)) {
- SAGA_ADAPTOR_THROW(path.string () +
- ": couldn't create the directory hierarchy", saga::DoesNotExist);
+ if (OpenMode & saga::filesystem::CreateParents)
+ {
+ if (!fs::create_directories (path)) {
+ SAGA_ADAPTOR_THROW(path.string () +
+ ": couldn't create the directory hierarchy", saga::DoesNotExist);
+ }
}
- else if ((OpenMode & saga::filesystem::Create) && !fs::create_directory (path)) {
- SAGA_ADAPTOR_THROW(path.string() +
- ": couldn't create the directory", saga::DoesNotExist);
+ else if (OpenMode & saga::filesystem::Create)
+ {
+ if (!fs::create_directory (path)) {
+ SAGA_ADAPTOR_THROW(path.string() +
+ ": couldn't create the directory", saga::DoesNotExist);
+ }
}
}
catch (boost::system::system_error const& e) {
More information about the saga-devel
mailing list