[gnome-boxes] iso-extractor: Use libarchive for extraction



commit b3342f6f7ae67556aab980cc586b593d2daffd1f
Author: Lasse Schuirmann <lasse schuirmann gmail com>
Date:   Sun Jun 1 18:44:03 2014 +0200

    iso-extractor: Use libarchive for extraction
    
    This drops the runtime depdendency on iso-read command.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720741

 src/iso-extractor.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/iso-extractor.vala b/src/iso-extractor.vala
index 9682eeb..31ae0c1 100644
--- a/src/iso-extractor.vala
+++ b/src/iso-extractor.vala
@@ -10,8 +10,8 @@ private class Boxes.ISOExtractor: GLib.Object {
 
     public async void extract (string path, string output_path, Cancellable? cancellable) throws GLib.Error {
         debug ("Extracting '%s' from '%s' at path '%s'..", path, device_file, output_path);
-        string[] argv = { "iso-read", "-i", device_file, "-e", path, "-o", output_path };
-        yield exec (argv, cancellable);
+        var reader = new ArchiveReader (device_file);
+        reader.extract_file (path, output_path, true);
         debug ("Extracted '%s' from '%s' at path '%s'.", path, device_file, output_path);
     }
 }


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