Hello community,

here is the log from the commit of package libzypp for openSUSE:Factory checked 
in at 2014-07-21 10:34:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libzypp (Old)
 and      /work/SRC/openSUSE:Factory/.libzypp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libzypp"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libzypp/libzypp.changes  2014-07-16 
16:49:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libzypp.new/libzypp.changes     2014-07-21 
10:34:54.000000000 +0200
@@ -1,0 +2,14 @@
+Fri Jul 18 08:57:39 CEST 2014 - [email protected]
+
+- Execute install scripts with cwd==/ (bnc#886764)
+- fix wrong '//' when extending URLs with an empty path (bnc#885254)
+- version 14.26.1 (26)
+
+-------------------------------------------------------------------
+Mon Jul 14 17:46:14 CEST 2014 - [email protected]
+
+- refreshService: add option to force repo status reset
+- Strip local filenames and args from URL.
+- version 14.26.0 (26)
+
+-------------------------------------------------------------------

Old:
----
  libzypp-14.25.0.tar.bz2

New:
----
  libzypp-14.26.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libzypp.spec ++++++
--- /var/tmp/diff_new_pack.Epe4F2/_old  2014-07-21 10:34:55.000000000 +0200
+++ /var/tmp/diff_new_pack.Epe4F2/_new  2014-07-21 10:34:55.000000000 +0200
@@ -23,7 +23,7 @@
 Summary:        Package, Patch, Pattern, and Product Management
 License:        GPL-2.0+
 Group:          System/Packages
-Version:        14.25.0
+Version:        14.26.1
 Release:        0
 Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc

++++++ libzypp-14.25.0.tar.bz2 -> libzypp-14.26.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/VERSION.cmake 
new/libzypp-14.26.1/VERSION.cmake
--- old/libzypp-14.25.0/VERSION.cmake   2014-07-11 13:45:16.000000000 +0200
+++ new/libzypp-14.26.1/VERSION.cmake   2014-07-18 08:58:44.000000000 +0200
@@ -59,10 +59,10 @@
 #   See './mkChangelog -h' for help.
 #
 SET(LIBZYPP_MAJOR "14")
-SET(LIBZYPP_COMPATMINOR "23")
-SET(LIBZYPP_MINOR "25")
-SET(LIBZYPP_PATCH "0")
+SET(LIBZYPP_COMPATMINOR "26")
+SET(LIBZYPP_MINOR "26")
+SET(LIBZYPP_PATCH "1")
 #
-# LAST RELEASED: 14.25.0 (23)
+# LAST RELEASED: 14.26.1 (26)
 # (The number in parenthesis is LIBZYPP_COMPATMINOR)
 #=======
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/package/libzypp.changes 
new/libzypp-14.26.1/package/libzypp.changes
--- old/libzypp-14.25.0/package/libzypp.changes 2014-07-11 13:45:16.000000000 
+0200
+++ new/libzypp-14.26.1/package/libzypp.changes 2014-07-18 08:58:44.000000000 
+0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Fri Jul 18 08:57:39 CEST 2014 - [email protected]
+
+- Execute install scripts with cwd==/ (bnc#886764)
+- fix wrong '//' when extending URLs with an empty path (bnc#885254)
+- version 14.26.1 (26)
+
+-------------------------------------------------------------------
+Mon Jul 14 17:46:14 CEST 2014 - [email protected]
+
+- refreshService: add option to force repo status reset
+- Strip local filenames and args from URL.
+- version 14.26.0 (26)
+
+-------------------------------------------------------------------
 Fri Jul 11 13:42:43 CEST 2014 - [email protected]
 
 - Support RepoInfo content keywords (FATE#316287)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/tests/lib/WebServer.cc 
new/libzypp-14.26.1/tests/lib/WebServer.cc
--- old/libzypp-14.25.0/tests/lib/WebServer.cc  2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/tests/lib/WebServer.cc  2014-07-18 10:17:51.000000000 
+0200
@@ -24,7 +24,7 @@
   {
     class fake_error_category : public error_category
     {
-      virtual const char *     name() const
+      virtual const char *     name() const noexcept(true)
       { return "falke_name"; }
       virtual std::string      message( int ev ) const
       { return "falke_message"; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/zypp/ExternalProgram.cc 
new/libzypp-14.26.1/zypp/ExternalProgram.cc
--- old/libzypp-14.25.0/zypp/ExternalProgram.cc 2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/zypp/ExternalProgram.cc 2014-07-18 08:58:44.000000000 
+0200
@@ -35,8 +35,7 @@
     ExternalProgram::ExternalProgram()
       : use_pty (false)
       , pid( -1 )
-    {
-    }
+    {}
 
 
     ExternalProgram::ExternalProgram( std::string commandline,
@@ -54,73 +53,56 @@
       argv[2] = commandline.c_str();
       argv[3] = 0;
 
-      const char* rootdir = NULL;
-      if(!root.empty() && root != "/")
-      {
-       rootdir = root.asString().c_str();
-      }
-      Environment environment;
-      start_program (argv, environment, stderr_disp, stderr_fd, 
default_locale, rootdir);
+      start_program( argv, Environment(), stderr_disp, stderr_fd, 
default_locale, root.c_str() );
     }
 
 
-    ExternalProgram::ExternalProgram (const Arguments &argv,
+    ExternalProgram::ExternalProgram( const Arguments & argv,
                                       Stderr_Disposition stderr_disp,
-                                      bool use_pty, int stderr_fd,
+                                      bool use_pty,
+                                     int stderr_fd,
                                       bool default_locale,
-                                      const Pathname& root)
+                                      const Pathname & root )
       : use_pty (use_pty)
       , pid( -1 )
     {
-        const char * argvp[argv.size() + 1];
-        unsigned c = 0;
-        for_( i, argv.begin(), argv.end() )
-        {
-            argvp[c] = i->c_str();
-            ++c;
-        }
-        argvp[c] = 0;
+      const char * argvp[argv.size() + 1];
+      unsigned c = 0;
+      for_( i, argv.begin(), argv.end() )
+      {
+       argvp[c] = i->c_str();
+       ++c;
+      }
+      argvp[c] = 0;
 
-        Environment environment;
-        const char* rootdir = NULL;
-        if(!root.empty() && root != "/")
-        {
-            rootdir = root.asString().c_str();
-        }
-        start_program (argvp, environment, stderr_disp, stderr_fd, 
default_locale, rootdir);
+      start_program( argvp, Environment(), stderr_disp, stderr_fd, 
default_locale, root.c_str() );
     }
 
 
-    ExternalProgram::ExternalProgram (const Arguments &argv,
+    ExternalProgram::ExternalProgram( const Arguments & argv,
                                       const Environment & environment,
                                       Stderr_Disposition stderr_disp,
-                                      bool use_pty, int stderr_fd,
+                                      bool use_pty,
+                                     int stderr_fd,
                                       bool default_locale,
-                                      const Pathname& root)
+                                     const Pathname & root )
       : use_pty (use_pty)
       , pid( -1 )
     {
-        const char * argvp[argv.size() + 1];
-        unsigned c = 0;
-        for_( i, argv.begin(), argv.end() )
-        {
-            argvp[c] = i->c_str();
-            ++c;
-        }
-        argvp[c] = 0;
-
-        const char* rootdir = NULL;
-        if(!root.empty() && root != "/")
-        {
-            rootdir = root.asString().c_str();
-        }
-        start_program (argvp, environment, stderr_disp, stderr_fd, 
default_locale, rootdir);
+      const char * argvp[argv.size() + 1];
+      unsigned c = 0;
+      for_( i, argv.begin(), argv.end() )
+      {
+       argvp[c] = i->c_str();
+       ++c;
+      }
+      argvp[c] = 0;
 
+      start_program( argvp, environment, stderr_disp, stderr_fd, 
default_locale, root.c_str() );
     }
 
 
 
-
     ExternalProgram::ExternalProgram( const char *const *argv,
                                       Stderr_Disposition stderr_disp,
                                       bool use_pty,
@@ -130,34 +112,27 @@
       : use_pty (use_pty)
       , pid( -1 )
     {
-      const char* rootdir = NULL;
-      if(!root.empty() && root != "/")
-      {
-       rootdir = root.asString().c_str();
-      }
-      Environment environment;
-      start_program (argv, environment, stderr_disp, stderr_fd, 
default_locale, rootdir);
+      start_program( argv, Environment(), stderr_disp, stderr_fd, 
default_locale, root.c_str() );
     }
 
 
-    ExternalProgram::ExternalProgram (const char *const *argv, const 
Environment & environment,
-                                 Stderr_Disposition stderr_disp, bool use_pty,
-                                 int stderr_fd, bool default_locale,
-                                 const Pathname& root)
+    ExternalProgram::ExternalProgram( const char *const * argv,
+                                     const Environment & environment,
+                                     Stderr_Disposition stderr_disp,
+                                     bool use_pty,
+                                     int stderr_fd,
+                                     bool default_locale,
+                                     const Pathname & root )
       : use_pty (use_pty)
       , pid( -1 )
     {
-      const char* rootdir = NULL;
-      if(!root.empty() && root != "/")
-      {
-       rootdir = root.asString().c_str();
-      }
-      start_program (argv, environment, stderr_disp, stderr_fd, 
default_locale, rootdir);
+      start_program( argv, environment, stderr_disp, stderr_fd, 
default_locale, root.c_str() );
     }
 
 
-    ExternalProgram::ExternalProgram (const char *binpath, const char *const 
*argv_1,
-                                 bool use_pty)
+    ExternalProgram::ExternalProgram( const char *binpath,
+                                     const char *const *argv_1,
+                                     bool use_pty )
       : use_pty (use_pty)
       , pid( -1 )
     {
@@ -166,14 +141,15 @@
        ;
       const char *argv[i + 1];
       argv[0] = binpath;
-      memcpy (&argv[1], argv_1, (i - 1) * sizeof (char *));
-      Environment environment;
-      start_program (argv, environment);
+      memcpy( &argv[1], argv_1, (i - 1) * sizeof (char *) );
+      start_program( argv, Environment() );
     }
 
 
-    ExternalProgram::ExternalProgram (const char *binpath, const char *const 
*argv_1, const Environment & environment,
-                                 bool use_pty)
+    ExternalProgram::ExternalProgram( const char *binpath,
+                                     const char *const *argv_1,
+                                     const Environment & environment,
+                                     bool use_pty )
       : use_pty (use_pty)
       , pid( -1 )
     {
@@ -182,20 +158,22 @@
        ;
       const char *argv[i + 1];
       argv[0] = binpath;
-      memcpy (&argv[1], argv_1, (i - 1) * sizeof (char *));
-      start_program (argv, environment);
+      memcpy( &argv[1], argv_1, (i - 1) * sizeof (char *) );
+      start_program( argv, environment );
     }
 
 
     ExternalProgram::~ExternalProgram()
-    {
-    }
+    {}
+
 
 
-    void
-    ExternalProgram::start_program (const char *const *argv, const Environment 
& environment,
-                               Stderr_Disposition stderr_disp,
-                               int stderr_fd, bool default_locale, const char* 
root)
+    void ExternalProgram::start_program( const char *const *argv,
+                                        const Environment & environment,
+                                        Stderr_Disposition stderr_disp,
+                                        int stderr_fd,
+                                        bool default_locale,
+                                        const char * root )
     {
       pid = -1;
       _exitStatus = 0;
@@ -206,6 +184,21 @@
       const char * redirectStdin = nullptr;    // <[file]
       const char * chdirTo = nullptr;          // #/[path]
 
+      if ( root )
+      {
+       if ( root[0] == '\0' )
+       {
+         root = nullptr;       // ignore empty root
+       }
+       else if ( root[0] == '/' && root[1] == '\0' )
+       {
+         // If root is '/' do not chroot, but chdir to '/'
+         // unless arglist defines another dir.
+         chdirTo = "/";
+         root = nullptr;
+       }
+      }
+
       for ( bool strip = false; argv[0]; ++argv )
       {
        strip = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/zypp/ExternalProgram.h 
new/libzypp-14.26.1/zypp/ExternalProgram.h
--- old/libzypp-14.25.0/zypp/ExternalProgram.h  2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/zypp/ExternalProgram.h  2014-07-18 08:58:44.000000000 
+0200
@@ -85,7 +85,7 @@
        * @param commandline a shell commandline that is appended to
        * <tt>/bin/sh -c</tt>.
        * @param default_locale whether to set LC_ALL=C before starting
-       * @param root directory to chroot into, / or empty to not chroot
+       * @param root directory to chroot into; or just 'cd' if '/'l;  nothing 
if empty
        */
       ExternalProgram (std::string commandline,
                     Stderr_Disposition stderr_disp = Normal_Stderr,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/zypp/RepoManager.cc 
new/libzypp-14.26.1/zypp/RepoManager.cc
--- old/libzypp-14.25.0/zypp/RepoManager.cc     2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/zypp/RepoManager.cc     2014-07-14 17:49:15.000000000 
+0200
@@ -497,11 +497,11 @@
     void removeService( const ServiceInfo & service )
     { removeService( service.alias() ); }
 
-    void refreshServices();
+    void refreshServices( const RefreshServiceOptions & options_r );
 
-    void refreshService( const std::string & alias );
-    void refreshService( const ServiceInfo & service )
-    {  refreshService( service.alias() ); }
+    void refreshService( const std::string & alias, const 
RefreshServiceOptions & options_r );
+    void refreshService( const ServiceInfo & service, const 
RefreshServiceOptions & options_r )
+    {  refreshService( service.alias(), options_r ); }
 
     void modifyService( const std::string & oldAlias, const ServiceInfo & 
newService );
 
@@ -1804,7 +1804,7 @@
 
   ////////////////////////////////////////////////////////////////////////////
 
-  void RepoManager::Impl::refreshServices()
+  void RepoManager::Impl::refreshServices( const RefreshServiceOptions & 
options_r )
   {
     // copy the set of services since refreshService
     // can eventually invalidate the iterator
@@ -1815,14 +1815,14 @@
         continue;
 
       try {
-       refreshService(*it);
+       refreshService(*it, options_r);
       }
       catch ( const repo::ServicePluginInformalException & e )
       { ;/* ignore ServicePluginInformalException */ }
     }
   }
 
-  void RepoManager::Impl::refreshService( const std::string & alias )
+  void RepoManager::Impl::refreshService( const std::string & alias, const 
RefreshServiceOptions & options_r )
   {
     ServiceInfo service( getService( alias ) );
     assert_alias( service );
@@ -1831,7 +1831,7 @@
     // Either when probing the type, or when adjusting the repositories
     // enable/disable state.:
     bool serviceModified = false;
-    MIL << "Going to refresh service '" << service.alias() << "', url: "<< 
service.url() << endl;
+    MIL << "Going to refresh service '" << service.alias() << "', url: "<< 
service.url() << ", opts: " << options_r << endl;
 
     //! \todo add callbacks for apps (start, end, repo removed, repo added, 
repo changed)
 
@@ -1954,23 +1954,35 @@
       TriBool toBeEnabled( indeterminate );    // indeterminate - follow the 
service request
       DBG << "Service request to " << (it->enabled()?"enable":"disable") << " 
service repo " << it->alias() << endl;
 
-      if ( service.repoToEnableFind( it->alias() ) )
+      if ( options_r.testFlag( RefreshService_restoreStatus ) )
       {
-       DBG << "User request to enable service repo " << it->alias() << endl;
-       toBeEnabled = true;
-        // Remove from enable request list.
-        // NOTE: repoToDisable is handled differently.
-        //       It gets cleared on each refresh.
-        service.delRepoToEnable( it->alias() );
-        serviceModified = true;
+       DBG << "Opt RefreshService_restoreStatus " << it->alias() << endl;
+       // this overrides any pending request!
+       // Remove from enable request list.
+       // NOTE: repoToDisable is handled differently.
+       //       It gets cleared on each refresh.
+       service.delRepoToEnable( it->alias() );
+       // toBeEnabled stays indeterminate!
       }
-      else if ( service.repoToDisableFind( it->alias() ) )
+      else
       {
-       DBG << "User request to disable service repo " << it->alias() << endl;
-       toBeEnabled = false;
+       if ( service.repoToEnableFind( it->alias() ) )
+       {
+         DBG << "User request to enable service repo " << it->alias() << endl;
+         toBeEnabled = true;
+         // Remove from enable request list.
+         // NOTE: repoToDisable is handled differently.
+         //       It gets cleared on each refresh.
+         service.delRepoToEnable( it->alias() );
+         serviceModified = true;
+       }
+       else if ( service.repoToDisableFind( it->alias() ) )
+       {
+         DBG << "User request to disable service repo " << it->alias() << endl;
+         toBeEnabled = false;
+       }
       }
 
-
       RepoInfoList::iterator oldRepo( findAlias( it->alias(), oldRepos ) );
       if ( oldRepo == oldRepos.end() )
       {
@@ -1994,6 +2006,11 @@
          // NOTE: Assert toBeEnabled is boolean afterwards!
          if ( oldRepo->enabled() == it->enabled() )
            toBeEnabled = it->enabled();        // service requests no change 
to the system
+         else if (options_r.testFlag( RefreshService_restoreStatus ) )
+         {
+           toBeEnabled = it->enabled();        // RefreshService_restoreStatus 
forced
+           DBG << "Opt RefreshService_restoreStatus " << it->alias() <<  " 
forces " << (toBeEnabled?"enabled":"disabled") << endl;
+         }
          else
          {
            const auto & last = service.repoStates().find( oldRepo->alias() );
@@ -2337,14 +2354,14 @@
   void RepoManager::removeService( const ServiceInfo & service )
   { return _pimpl->removeService( service ); }
 
-  void RepoManager::refreshServices()
-  { return _pimpl->refreshServices(); }
+  void RepoManager::refreshServices( const RefreshServiceOptions & options_r )
+  { return _pimpl->refreshServices( options_r ); }
 
-  void RepoManager::refreshService( const std::string & alias )
-  { return _pimpl->refreshService( alias ); }
+  void RepoManager::refreshService( const std::string & alias, const 
RefreshServiceOptions & options_r )
+  { return _pimpl->refreshService( alias, options_r ); }
 
-  void RepoManager::refreshService( const ServiceInfo & service )
-  { return _pimpl->refreshService( service ); }
+  void RepoManager::refreshService( const ServiceInfo & service, const 
RefreshServiceOptions & options_r )
+  { return _pimpl->refreshService( service, options_r ); }
 
   void RepoManager::modifyService( const std::string & oldAlias, const 
ServiceInfo & service )
   { return _pimpl->modifyService( oldAlias, service ); }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/zypp/RepoManager.h 
new/libzypp-14.26.1/zypp/RepoManager.h
--- old/libzypp-14.25.0/zypp/RepoManager.h      2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/zypp/RepoManager.h      2014-07-14 17:49:15.000000000 
+0200
@@ -17,6 +17,7 @@
 
 #include "zypp/base/PtrTypes.h"
 #include "zypp/base/Iterator.h"
+#include "zypp/base/Flags.h"
 
 #include "zypp/Pathname.h"
 #include "zypp/ZConfig.h"
@@ -141,10 +142,16 @@
       BuildForced
     };
 
-    enum RepoRemovePolicy
+    /** Flags for tuning RefreshService */
+    enum RefreshServiceBit
     {
-
+      RefreshService_restoreStatus     = (1<<0)        ///< Force restoring 
repo enabled/disabled staus
     };
+    ZYPP_DECLARE_FLAGS(RefreshServiceFlags,RefreshServiceBit);
+
+    /** Options tuning RefreshService */
+    typedef RefreshServiceFlags RefreshServiceOptions;
+
 
     /** \name Known repositories.
      *
@@ -591,7 +598,7 @@
      *
      * \see refreshService(ServiceInfo)
      */
-    void refreshServices();
+    void refreshServices( const RefreshServiceOptions & options_r = 
RefreshServiceOptions() );
 
     /**
      * Refresh specific service.
@@ -601,9 +608,9 @@
      * \throws RepoException if service is not found.
      * \throws MediaException If there's a problem downloading the repo index 
file.
      */
-    void refreshService( const std::string & alias );
+    void refreshService( const std::string & alias, const 
RefreshServiceOptions & options_r = RefreshServiceOptions() );
     /** \overload Take alias from ServiceInfo */
-    void refreshService( const ServiceInfo & service );
+    void refreshService( const ServiceInfo & service, const 
RefreshServiceOptions & options_r = RefreshServiceOptions() );
 
     /**
      * Modifies service file (rewrites it with new values) and underlying
@@ -689,6 +696,7 @@
     /** Pointer to implementation */
     RWCOW_pointer<Impl> _pimpl;
   };
+  ZYPP_DECLARE_OPERATORS_FOR_FLAGS(RepoManager::RefreshServiceFlags);
   ///////////////////////////////////////////////////////////////////
 
   /** \relates RepoManager Stream output */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libzypp-14.25.0/zypp/media/MediaCurl.cc 
new/libzypp-14.26.1/zypp/media/MediaCurl.cc
--- old/libzypp-14.25.0/zypp/media/MediaCurl.cc 2014-07-01 11:30:28.000000000 
+0200
+++ new/libzypp-14.26.1/zypp/media/MediaCurl.cc 2014-07-18 08:58:44.000000000 
+0200
@@ -495,11 +495,14 @@
   curlUrl.delQueryParam("proxypass");
   curlUrl.delQueryParam("ssl_capath");
   curlUrl.delQueryParam("ssl_verify");
+  curlUrl.delQueryParam("ssl_clientcert");
   curlUrl.delQueryParam("timeout");
   curlUrl.delQueryParam("auth");
   curlUrl.delQueryParam("username");
   curlUrl.delQueryParam("password");
   curlUrl.delQueryParam("mediahandler");
+  curlUrl.delQueryParam("credentials");
+  curlUrl.delQueryParam("head_requests");
   return curlUrl;
 }
 
@@ -833,31 +836,29 @@
   disconnect();
 }
 
-Url MediaCurl::getFileUrl(const Pathname & filename) const
+Url MediaCurl::getFileUrl( const Pathname & filename_r ) const
 {
-  Url newurl(_url);
-  string path = _url.getPathName();
-  if ( !path.empty() && path != "/" && *path.rbegin() == '/' &&
-       filename.absolute() )
-  {
-    // If url has a path with trailing slash, remove the leading slash from
-    // the absolute file name
-    path += filename.asString().substr( 1, filename.asString().size() - 1 );
-  }
-  else if ( filename.relative() )
-  {
-    // Add trailing slash to path, if not already there
-    if (path.empty()) path = "/";
-    else if (*path.rbegin() != '/' ) path += "/";
-    // Remove "./" from begin of relative file name
-    path += filename.asString().substr( 2, filename.asString().size() - 2 );
+  std::string path( _url.getPathName() );
+  // Simply extend the URLs pathname. An 'absolute' URL path
+  // is achieved by encoding the 2nd '/' in the URL:
+  //   URL: ftp://user@server  -> ~user
+  //   URL: ftp://user@server/ -> ~user
+  //   URL: ftp://user@server//        -> /
+  //                         ^- this '/' is just a separator
+  if ( path.empty() ||  path == "/" )  // empty URL path; the '/' is just a 
separator
+  {
+    path = filename_r.absolutename().asString();
+  }
+  else if ( *path.rbegin() == '/' )
+  {
+    path += filename_r.absolutename().asString().substr(1);
   }
   else
   {
-    path += filename.asString();
+    path += filename_r.absolutename().asString();
   }
-
-  newurl.setPathName(path);
+  Url newurl( _url );
+  newurl.setPathName( path );
   return newurl;
 }
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to