[msitools] msiextract: fix extracting to SourceDir



commit 47eb95b9c5367b0b8ac254fb607a4b22b7ebdaa2
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Sat Nov 19 16:31:51 2016 +0400

    msiextract: fix extracting to SourceDir
    
    A component extracting directly to TARGETDIR/SourceDir location ended up
    with an invalid/empty name. SourceDir is actually the root of extaction,
    so return an empty folder in get_directory_name().
    
    Fixes:
    https://bugzilla.gnome.org/show_bug.cgi?id=773935
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 tools/msiextract.vala |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/tools/msiextract.vala b/tools/msiextract.vala
index 42c9293..ae02068 100644
--- a/tools/msiextract.vala
+++ b/tools/msiextract.vala
@@ -84,10 +84,8 @@ public string? get_directory_name (Libmsi.Record rec) throws GLib.Error {
     // only by intuition...
     if (rec.get_string (1) == "ProgramFilesFolder")
         return "Program Files";
-    else if (name == ".")
+    else if (name == "." || name == "SourceDir")
         return "";
-    else if (name == "SourceDir")
-        return null;
 
     return name;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]