ソースを参照

correcting bug, bumbing to 0.3.5

Nicole Portas 3 週間 前
コミット
b347061508

+ 18 - 10
MainWindow.cpp

@@ -1,5 +1,5 @@
 /*
- * GnomeSettingsVault - A GNOME configuration backup utility v0.3.4
+ * GnomeSettingsVault - A GNOME configuration backup utility v0.3.5
  * Copyright (C) 2026 Nicole Portas, nicole@equalmass.com
  */
 
@@ -31,6 +31,7 @@ MainWindow::MainWindow()
       m_CheckDebugMode("Write Debug Log to Disk (~/GnomeSettingsVault.log)"),
       m_VBoxBackup(Gtk::ORIENTATION_VERTICAL, 10),
       m_LabelBackupInstruction("<span size='large' weight='bold'>Backup Settings</span>"),
+      m_EntryVaultName(),
       m_ButtonSelectDest("Choose Destination Folder"),
       m_LabelBackupPath("No destination selected"),
       m_CheckThemesBackup("GTK Themes"),
@@ -57,7 +58,7 @@ MainWindow::MainWindow()
 {
     m_Dispatcher.connect(sigc::mem_fun(*this, &MainWindow::on_dispatcher_ping));
     set_default_size(1000, 750);
-    m_HeaderBar.set_title("GnomeSettingsVault 0.3.4");
+    m_HeaderBar.set_title("GnomeSettingsVault 0.3.5");
     m_HeaderBar.set_show_close_button(true);
     set_titlebar(m_HeaderBar);
     set_wmclass("gnome-vault", "GnomeSettingsVault");
@@ -78,7 +79,6 @@ MainWindow::MainWindow()
     m_ScrolledWindow.add(m_LogView);
     m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_ALWAYS);
 
-    // --- Backup Tab Layout ---
     m_VBoxBackup.set_border_width(20);
     m_VBoxBackup.pack_start(m_LabelBackupInstruction, Gtk::PACK_SHRINK);
     m_VBoxBackup.pack_start(m_EntryVaultName, Gtk::PACK_SHRINK);
@@ -91,7 +91,6 @@ MainWindow::MainWindow()
     m_VBoxBackup.pack_start(m_CheckDconfBackup, Gtk::PACK_SHRINK);
     m_VBoxBackup.pack_end(m_ButtonBackup, Gtk::PACK_SHRINK);
 
-    // --- Restore Tab Layout ---
     m_VBoxRestore.set_border_width(20);
     m_VBoxRestore.pack_start(m_LabelRestoreInstruction, Gtk::PACK_SHRINK);
     m_VBoxRestore.pack_start(m_ButtonSelectVault, Gtk::PACK_SHRINK);
@@ -508,15 +507,24 @@ bool MainWindow::extract_tar_archive(const std::string& ap, const std::string& d
     bool ok = true;
     while (archive_read_next_header(a, &e) == ARCHIVE_OK) {
         std::string sp = archive_entry_pathname(e);
+        
         if (!abs) {
-            size_t p = sp.find("/themes/");
-            if (p == std::string::npos) p = sp.find("/icons/");
-            if (p == std::string::npos) p = sp.find("/extensions/");
-            if (p != std::string::npos) {
-                size_t s = sp.find('/', p + 1);
-                if (s != std::string::npos) sp = sp.substr(s + 1);
+            std::string to_strip = "";
+            // Look at the archive name to figure out what base path we are stripping, 
+            // preventing sub-directories from triggering a false match.
+            if (ap.find("extensions") != std::string::npos) to_strip = "/extensions/";
+            else if (ap.find("themes") != std::string::npos) to_strip = "/themes/";
+            else if (ap.find("icons") != std::string::npos) to_strip = "/icons/";
+
+            if (!to_strip.empty()) {
+                size_t p = sp.find(to_strip);
+                if (p != std::string::npos) {
+                    // Strip everything up to and including the matched directory string
+                    sp = sp.substr(p + to_strip.length());
+                }
             }
         }
+        
         std::string t = abs ? archive_entry_pathname(e) : ds + "/" + sp;
         archive_entry_set_pathname(e, t.c_str());
 

+ 1 - 1
gnome-vault_0.3.4_amd64/DEBIAN/control → gnome-vault_0.3.5_amd64/DEBIAN/control

@@ -1,5 +1,5 @@
 Package: gnome-vault
-Version: 0.3.4
+Version: 0.3.5
 Section: utils
 Priority: optional
 Architecture: amd64

+ 0 - 0
gnome-vault_0.3.4_amd64/usr/share/applications/gnome-vault.desktop → gnome-vault_0.3.5_amd64/usr/share/applications/gnome-vault.desktop


+ 0 - 0
gnome-vault_0.3.4_amd64/usr/share/icons/hicolor/512x512/apps/gnome-vault.png → gnome-vault_0.3.5_amd64/usr/share/icons/hicolor/512x512/apps/gnome-vault.png