You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2010/06/11 13:24:21 UTC

svn commit: r953664 - /subversion/trunk/subversion/libsvn_subr/io.c

Author: ivan
Date: Fri Jun 11 11:24:21 2010
New Revision: 953664

URL: http://svn.apache.org/viewvc?rev=953664&view=rev
Log:
Fix generating unique temporary file on Windows. Before this change 
temporary files are created in the drive root when caller asked to create 
files in current working directory.

This fixes two failures in svnadmin_tests.py and export_tests.py when 
running test suite on Windows without write access to root directory.

* subversion/libsvn_subr/io.c
  (temp_file_create): Use svn_dirent_join to combine path instead of 
   apr_psprintf().

Modified:
    subversion/trunk/subversion/libsvn_subr/io.c

Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=953664&r1=953663&r2=953664&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Fri Jun 11 11:24:21 2010
@@ -3594,8 +3594,10 @@ temp_file_create(apr_file_t **new_file,
          disk io) */
       unique_nr = baseNr + 3 * i;
 
-      unique_name = apr_psprintf(scratch_pool, "%s/svn-%X", directory,
-                                 unique_nr);
+      unique_name = svn_dirent_join(directory,
+                                    apr_psprintf(scratch_pool, "svn-%X",
+                                                 unique_nr),
+                                    scratch_pool);
 
       SVN_ERR(cstring_from_utf8(&unique_name_apr, unique_name, scratch_pool));