Skip to content

Commit 99e90a5

Browse files
committed
BUG: Add patch to normalize the base_data_dir path
1 parent 7d96e3a commit 99e90a5

File tree

2 files changed

+9
-0
lines changed
  • qiita_db/support_files/patches

2 files changed

+9
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- August 24, 2015
2+
-- Delete all occurrences of '..' in the base_data_dir entry
3+
SELECT 42;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from os.path import realpath
2+
from qiita_db.sql_connection import SQLConnectionHandler
3+
4+
conn = SQLConnectionHandler()
5+
path = conn.execute_fetchone('SELECT base_data_dir FROM settings')[0]
6+
conn.execute("UPDATE settings SET base_data_dir = %s", (realpath(path),))

0 commit comments

Comments
 (0)