[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Issue 1140, dirs with spaces (incomplete)

From: Sander Striker <striker_at_apache.org>
Date: 2003-02-19 08:48:36 CET

Index: subversion/clients/cmdline/checkout-cmd.c
===================================================================
--- subversion/clients/cmdline/checkout-cmd.c (revision 4911)
Here a partial patch that may be of use to cmike (since he assigned
the issue to himself).

It only does url decoding right now for paths used as targets.
The complete fix prolly means hardening svn_is_url to return FALSE when
the 'url' contains spaces.

Sander

+++ subversion/clients/cmdline/checkout-cmd.c (working copy)
@@ -88,8 +88,11 @@
   if (svn_path_is_url (local_dir))
     {
       if (targets->nelts == 1)
- local_dir = svn_path_basename (((const char **) (targets->elts))[0],
- pool);
+ {
+ local_dir = svn_path_basename (((const char **) (targets->elts))[0],
+ pool);
+ local_dir = svn_path_uri_decode (local_dir, pool);
+ }
       else
         local_dir = "";
       (*((const char **) apr_array_push (targets))) = local_dir;
@@ -117,9 +120,13 @@
       if (targets->nelts == 2)
         target_dir = local_dir;
       else
- target_dir = svn_path_join (local_dir,
- svn_path_basename (repos_url, subpool),
- subpool);
+ {
+ target_dir = svn_path_basename (repos_url, subpool);
+ target_dir = svn_path_uri_decode (target_dir, subpool);
+ target_dir = svn_path_join (local_dir,
+ target_dir,
+ subpool);
+ }

       SVN_ERR (svn_client_checkout (repos_url,
                                     target_dir,
Index: subversion/clients/cmdline/export-cmd.c
===================================================================
--- subversion/clients/cmdline/export-cmd.c (revision 4911)
+++ subversion/clients/cmdline/export-cmd.c (working copy)
@@ -58,8 +58,11 @@

   /* If only one target was given, split off the basename to use as
      the `to' path. Else, a `to' path was supplied. */
- if (targets->nelts == 1)
- to = svn_path_basename (from, pool);
+ if (targets->nelts == 1)
+ {
+ to = svn_path_basename (from, pool);
+ to = svn_path_uri_decode (to, pool);
+ }
   else
     to = ((const char **) (targets->elts))[1];

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 19 08:49:20 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.