[Saga-devel] saga SVN commit 3303: /trunk/adaptors/ssh/ssh_file/

amerzky at cct.lsu.edu amerzky at cct.lsu.edu
Thu Jan 15 14:48:28 CST 2009


User: amerzky
Date: 2009/01/15 02:48 PM

Modified:
 /trunk/adaptors/ssh/ssh_file/
  ssh_file_adaptor_sshfs.cpp

Log:
 fix

File Changes:

Directory: /trunk/adaptors/ssh/ssh_file/
========================================

File [modified]: ssh_file_adaptor_sshfs.cpp
Delta lines: +9 -5
===================================================================
--- trunk/adaptors/ssh/ssh_file/ssh_file_adaptor_sshfs.cpp	2009-01-15 17:19:26 UTC (rev 3302)
+++ trunk/adaptors/ssh/ssh_file/ssh_file_adaptor_sshfs.cpp	2009-01-15 20:48:20 UTC (rev 3303)
@@ -185,12 +185,16 @@
     // create local mount point
     try 
     {
-      saga::url u ("file://localhost/");
-      u.set_path (mount_);
+      saga::filesystem::directory root ("file://localhost/");
 
-      saga::filesystem::directory d (s_, u, 
-                                     saga::filesystem::Create |
-                                     saga::filesystem::CreateParents);
+      if ( ! root.exists (mount_) ||
+           ! root.is_dir (mount_) )
+      {
+        root.open_dir (mount_, 
+                       saga::filesystem::Create        |
+                       saga::filesystem::CreateParents |
+                       saga::filesystem::Overwrite     );
+      }
     }
     catch ( const saga::exception & e )
     {



More information about the saga-devel mailing list