Package: puredata / 0.46.2-1

fix_startup_without_HOME.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
28
29
30
31
32
33
34
Description: Allow starting of GUI if .config file cannot be read
 Pd does not check during loading the configuration, if the configuration file
 can be opened (.config/puredata).
 If the file permissions do not allow to read the folder an exception is thrown,
 but not catched/reported by Pd - and since the UI thread fails the UI is not
 loaded properly then.
 The problem is triggered when starting Pd via sudo:
 $ sudo -u XX puredata
Author: Dennis Guse
Origin: https://bugs.launchpad.net/ubuntu/+source/puredata/+bug/1359410
Bug: http://sourceforge.net/p/pure-data/bugs/1147/
Reviewed-by: IOhannes m zmölnig
Last-Update: 2014-09-30
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- puredata.orig/tcl/pd_guiprefs.tcl
+++ puredata/tcl/pd_guiprefs.tcl
@@ -217,9 +217,13 @@
 # linux only! : look for pd config directory and create it if needed
 #
 proc ::pd_guiprefs::prepare_configdir {} {
-    if {[file isdirectory $::recentfiles_domain] != 1} {
-        file mkdir $::recentfiles_domain
-        ::pdwindow::debug "$::recentfiles_domain was created.\n"
+    if { [catch {
+    	if {[file isdirectory $::recentfiles_domain] != 1} {
+    	    file mkdir $::recentfiles_domain
+    	    ::pdwindow::debug "$::recentfiles_domain was created.\n"
+	    }
+    }]} {
+		::pdwindow::error "$::recentfiles_domain was *NOT* created.\n"
     }
 }