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

amerzky at cct.lsu.edu amerzky at cct.lsu.edu
Thu Jan 15 05:37:21 CST 2009


User: amerzky
Date: 2009/01/15 05:37 AM

Modified:
 /trunk/adaptors/default/file/
  common_helpers.hpp, default_namespace_dir_impl.hpp

Log:
 - fix escaping - hope that breaks nothing else
  - boost seems to be unable to handle filenames with spaces?  added
    try/catch for sync_list
 Hartmut, do these make sense?
 A

File Changes:

Directory: /trunk/adaptors/default/file/
========================================

File [modified]: common_helpers.hpp
Delta lines: +1 -1
===================================================================
--- trunk/adaptors/default/file/common_helpers.hpp	2009-01-15 10:39:34 UTC (rev 3287)
+++ trunk/adaptors/default/file/common_helpers.hpp	2009-01-15 11:37:10 UTC (rev 3288)
@@ -70,7 +70,7 @@
     inline std::string 
     get_filepath(saga::url const& loc)
     {
-        return loc.get_path();
+        return saga::url::unescape (loc.get_path());
     }
 
     ///////////////////////////////////////////////////////////////////////////

File [modified]: default_namespace_dir_impl.hpp
Delta lines: +10 -2
===================================================================
--- trunk/adaptors/default/file/default_namespace_dir_impl.hpp	2009-01-15 10:39:34 UTC (rev 3287)
+++ trunk/adaptors/default/file/default_namespace_dir_impl.hpp	2009-01-15 11:37:10 UTC (rev 3288)
@@ -318,8 +318,16 @@
     fs::directory_iterator dir_end = fs::directory_iterator();
     for (fs::directory_iterator dir_it(path); dir_it != dir_end; ++dir_it)
     {
-        //retval.push_back(host + saga::detail::leaf((*dir_it))); see --> Spec. p. 141
-        retval.push_back(saga::detail::leaf(*dir_it));
+        try {
+          //retval.push_back(host + saga::detail::leaf((*dir_it))); see --> Spec. p. 141
+          retval.push_back(saga::detail::leaf(*dir_it));
+        }
+        catch ( ... )
+        {
+           // ignore this one
+          SAGA_LOG_ERROR("Boost failed to handle some filename");
+          SAGA_LOG_ALWAYS("Boost failed to handle some filename");
+        }
     }
 }
 



More information about the saga-devel mailing list