From 8a6ac6be1e124fdd84f212a3095303abb30fe04a Mon Sep 17 00:00:00 2001 From: Terrtia Date: Wed, 24 Oct 2018 15:16:12 +0200 Subject: [PATCH] fix: [Paste] create absolute path --- bin/packages/Paste.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/packages/Paste.py b/bin/packages/Paste.py index 524a7665..5e63634e 100755 --- a/bin/packages/Paste.py +++ b/bin/packages/Paste.py @@ -82,6 +82,10 @@ class Paste(object): db=cfg.getint("ARDB_Metadata", "db"), decode_responses=True) + PASTES_FOLDER = os.path.join(os.environ['AIL_HOME'], cfg.get("Directories", "pastes")) + if PASTES_FOLDER not in p_path: + p_path = os.path.join(PASTES_FOLDER, p_path) + self.p_path = p_path self.p_name = os.path.basename(self.p_path) self.p_size = round(os.path.getsize(self.p_path)/1024.0, 2)