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

[PATCH] svn_load_dirs.pl: fix rm temporary folder

From: Geoffrey Alary <geoffrey.alary_at_gmail.com>
Date: Sat, 20 Dec 2014 10:40:33 +0900

Hello,

I am contacting you to propose 2 patch files for the script
svn_load_dirs.pl located at the URL below:
http://svn.apache.org/repos/asf/subversion/trunk/contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in

This email discusses the first patch, which avoids failing to delete
the temporary folder with an error like this one:
"cannot remove path when cwd is
/tmp/svn_load_dirs_ATrGGCJoWv/my_import_wc for
/tmp/svn_load_dirs_ATrGGCJoWv"

The error has also been reported at the following link:
http://www.wandisco.com/svnforum/threads/40434-Import-snapshot-folders-requesting-step-by-step-guide-for-using-svn_load_dirs-pl?p=116340&viewfull=1#post116340

I propose a really simple patch, as pasted below (I also send it
attached if you prefer).

Best regards,
Geoffrey

--- contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
+++ contrib/client-side/svn_load_dirs/svn_load_dirs.pl.in
@@ -2052,6 +2052,7 @@

 sub DESTROY
 {
   print "Cleaning up $temp_dir\n";
+ chdir( $temp_dir . "/.." );
   File::Path::rmtree([$temp_dir], 0, 0);
 }

Received on 2014-12-20 03:32:21 CET

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