tags 862593 + patch
thanks

The archive gets overwritten as the test to see whether it already exists
(to determine whether to create a new one or simply add a new file) uses
an escaped path.

Patch attached. 


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/src/tar.c b/src/tar.c
index b7d23f8..bd035ca 100644
--- a/src/tar.c
+++ b/src/tar.c
@@ -197,7 +197,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
        switch (archive->type)
        {
                case XARCHIVETYPE_TAR:
-               if ( g_file_test (archive->escaped_path,G_FILE_TEST_EXISTS))
+               if ( g_file_test (archive->path,G_FILE_TEST_EXISTS))
                        command = g_strconcat (tar, " ",
                                                                        
archive->add_recurse ? "" : "--no-recursion ",
                                                                        
archive->remove_files ? "--remove-files " : "",
@@ -213,7 +213,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
                break;
 
                case XARCHIVETYPE_TAR_BZ2:
-               if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) 
)
+               if ( g_file_test ( archive->path , G_FILE_TEST_EXISTS ) )
                        xa_add_delete_bzip2_gzip_lzma_compressed_tar 
(files,archive,1);
                else
                        command = g_strconcat (tar, " ",
@@ -224,7 +224,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
                break;
 
                case XARCHIVETYPE_TAR_GZ:
-               if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) 
)
+               if ( g_file_test ( archive->path , G_FILE_TEST_EXISTS ) )
                        xa_add_delete_bzip2_gzip_lzma_compressed_tar 
(files,archive,1);
                else
                        command = g_strconcat (tar, " ",
@@ -235,7 +235,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
                break;
                
                case XARCHIVETYPE_TAR_LZMA:
-               if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) 
)
+               if ( g_file_test ( archive->path , G_FILE_TEST_EXISTS ) )
                        xa_add_delete_bzip2_gzip_lzma_compressed_tar 
(files,archive,1);
                else
                        command = g_strconcat (tar, " ",
@@ -246,7 +246,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
                break;
                
                case XARCHIVETYPE_TAR_XZ:
-               if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) 
)
+               if ( g_file_test ( archive->path , G_FILE_TEST_EXISTS ) )
                        xa_add_delete_bzip2_gzip_lzma_compressed_tar 
(files,archive,1);
                else
                        command = g_strconcat (tar, " ",
@@ -257,7 +257,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar 
*compression_string)
                break;
                
                case XARCHIVETYPE_TAR_LZOP:
-               if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) 
)
+               if ( g_file_test ( archive->path , G_FILE_TEST_EXISTS ) )
                        xa_add_delete_bzip2_gzip_lzma_compressed_tar 
(files,archive,1);
                else
                        command = g_strconcat (tar, " ",

Reply via email to