[Saga-devel] saga SVN commit 3304: /trunk/adaptors/default/file/

Hartmut Kaiser hkaiser at cct.lsu.edu
Thu Jan 15 16:50:44 CST 2009


> User: amerzky
> Date: 2009/01/15 03:19 PM
> 
> Modified:
>  /trunk/adaptors/default/file/
>   default_dir.cpp
> 
> Log:
>  don't create directory twice!
>  A
> 
> File Changes:
> 
> Directory: /trunk/adaptors/default/file/
> ========================================
> 
> File [modified]: default_dir.cpp
> Delta lines: +5 -3
> ===================================================================
> --- trunk/adaptors/default/file/default_dir.cpp	2009-01-15 20:48:20
UTC
> (rev 3303)
> +++ trunk/adaptors/default/file/default_dir.cpp	2009-01-15 21:18:54
UTC
> (rev 3304)
> @@ -88,9 +88,11 @@
>          }
>          else {
>              try {
> -                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 (!fs::create_directory (path)) {
>                      SAGA_ADAPTOR_THROW(path.string() +

What's the difference between the old and the new code?

Regards Hartmut



More information about the saga-devel mailing list