Package: openshot-qt / 2.6.1+dfsg1-3

0001-Use-the-temporary-directory-instead-of-the-home-dire.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From: "Dr. Tobias Quathamer" <toddy@debian.org>
Date: Sat, 5 Mar 2022 16:21:40 +0100
Subject: Use the temporary directory instead of the home directory for
 package building

---
 src/classes/info.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/classes/info.py b/src/classes/info.py
index ba64b43..bbf4b30 100644
--- a/src/classes/info.py
+++ b/src/classes/info.py
@@ -48,6 +48,13 @@ EXPORT_PRESETS_PATH = os.path.join(PATH, "presets")
 
 # User paths
 HOME_PATH = os.path.join(os.path.expanduser("~"))
+# If the home directory does not exist, use the
+# temporay directory. This is needed during the
+# package build, otherwise the sphinx docs cannot
+# be bult.
+if not os.path.exists(HOME_PATH.encode("UTF-8")):
+    import tempfile
+    HOME_PATH = tempfile.gettempdir()
 USER_PATH = os.path.join(HOME_PATH, ".openshot_qt")
 BACKUP_PATH = os.path.join(USER_PATH)
 RECOVERY_PATH = os.path.join(USER_PATH, "recovery")