Author: colossus
Date: 2006-11-16 07:37:03 +0000 (Thu, 16 Nov 2006)
New Revision: 23891

Modified:
   xarchiver/trunk/TODO
   xarchiver/trunk/src/iso.c
Log:
Fixed overwrite of files when extracting single iso files when "Overwrite" 
option is NOT checked.
Updated TODO.


Modified: xarchiver/trunk/TODO
===================================================================
--- xarchiver/trunk/TODO        2006-11-16 01:18:09 UTC (rev 23890)
+++ xarchiver/trunk/TODO        2006-11-16 07:37:03 UTC (rev 23891)
@@ -5,4 +5,5 @@
 - support tar on *BSD.
 - avoid reset of extract dialog options when loading a new archive.
 - add tooltip in the Add Dialog to tell user files and dir can be also DnD.
-- ability to create directly sfx archives through the Add dialog.
+- ability to create sfx archives through the Add dialog for those archives 
which support it.
+- ability to create a comment to the archive through the Add dialog.

Modified: xarchiver/trunk/src/iso.c
===================================================================
--- xarchiver/trunk/src/iso.c   2006-11-16 01:18:09 UTC (rev 23890)
+++ xarchiver/trunk/src/iso.c   2006-11-16 07:37:03 UTC (rev 23891)
@@ -475,6 +475,11 @@
        if (archive->full_path == 0)
        {
                filename = g_strconcat (destination_path , g_strrstr ( 
_filename , "/" ) , NULL);
+               if (archive->overwrite == FALSE && g_file_test ( filename , 
G_FILE_TEST_EXISTS) == TRUE)
+               {
+                       g_free (filename);
+                       return TRUE;
+               }
                result = xa_write_file_to_disk ( archive->path, filename, 
file_size, file_offset );
                g_free (filename);
                return result;
@@ -496,6 +501,11 @@
                }
        }
        final_path = g_strconcat (destination_path, _filename, NULL);
+       if (archive->overwrite == FALSE && g_file_test ( final_path , 
G_FILE_TEST_EXISTS) == TRUE)
+       {
+               g_free (final_path);
+               return TRUE;
+       }
        result = xa_write_file_to_disk ( archive->path, final_path, file_size, 
file_offset );
        g_free (final_path);
        return result;

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to