summaryrefslogtreecommitdiff
path: root/debian/patches/48_search_base_dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/48_search_base_dir.patch')
-rw-r--r--debian/patches/48_search_base_dir.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/48_search_base_dir.patch b/debian/patches/48_search_base_dir.patch
new file mode 100644
index 0000000..19e5212
--- /dev/null
+++ b/debian/patches/48_search_base_dir.patch
@@ -0,0 +1,21 @@
+running "jack -Q" twice from e.g. $HOME will result in an error in the
+second case that the directory already exists. This is because jack
+doesn't find the existing directory, makes a new generic jack-* dir and
+then tries to rename it - but that fails since there's an existing dir
+already. jack needs to search base_dir for an existing dir.
+
+--- jack_prepare.py~ 2006-04-04 22:45:10.000000000 +0200
++++ jack_prepare.py 2006-04-04 22:45:58.000000000 +0200
+@@ -72,6 +72,12 @@
+
+ if cf['_scan_dirs']:
+ dirs = [os.getcwd()]
++ # Also scan base_dir since it's not guaranteed that users
++ # run jack in base_dir
++ if cf['_base_dir']:
++ cf['_base_dir'] = expand(cf['_base_dir'])
++ if os.path.exists(cf['_base_dir']) and cf['_base_dir'] not in dirs:
++ dirs.append(cf['_base_dir'])
+ else:
+ dirs = cf['_searchdirs']
+