[Tails-dev] [review'n'merge:1.2.1] bugfix/7678-Tails-Install…

Delete this message

Reply to this message
Author: kurono
Date:  
To: tails-dev
Subject: [Tails-dev] [review'n'merge:1.2.1] bugfix/7678-Tails-Installer-crashes-on-upgrade
Hi,

Ticket: https://labs.riseup.net/code/issues/7678

I don't have yet a liveusb-creator repo yet, (If I remember correctly
already sent the requirement). So I am attaching the patch.

Cheers,

kurono

>From 3d3dabddc765592c9ff01d74cd6c31dad9b01625 Mon Sep 17 00:00:00 2001
From: Tails developers <tails@???>
Date: Thu, 27 Nov 2014 20:50:30 +0100
Subject: [PATCH] bugfix/7678-Tails-Installer-crashes-on-upgrade

---
liveusb/source.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/liveusb/source.py b/liveusb/source.py
index 3f93c1e..fba0843 100644
--- a/liveusb/source.py
+++ b/liveusb/source.py
@@ -7,6 +7,7 @@ import subprocess
 from stat import ST_SIZE
 from liveusb import _
 from liveusb.releases import releases
+from liveusb.config import config
 from liveusb.utils import (_to_unicode, _dir_size, iso_is_live_system,
                            unicode_to_utf8, _set_liberal_perms_recursive,
                            underlying_physical_device)
@@ -85,7 +86,8 @@ class RunningLiveSystemSource(Source):
         self.size = _dir_size(self.path)
         self.dev  = underlying_physical_device(self.path)
     def clone(self, destination):
-        for f in os.listdir(self.path):
+        toplevels = config['liveos_toplevel_files']
+        for f in toplevels:
             src = os.path.join(self.path, f)
             dst = os.path.join(destination, f)
             if os.path.isfile(src):
-- 
1.8.3.2