From 1b1689d09c455588a9b8e3787e223c4c1e8f673f Mon Sep 17 00:00:00 2001 From: Grigori Fursin Date: Tue, 25 Aug 2020 08:43:41 +0000 Subject: [PATCH] fixed a bug when adding a new dataset --- CHANGES | 2 ++ module/dataset/module.py | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 16ae495..bee6170 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +* 2020.08.25 - [gfursin] fixed a bug when adding a new dataset + * 2020.01.31 - [gfursin] improved error message in program module. * 2019.07.09 - [gfursin] propagate compiler_tags specifically for "get_compiler_version" subaction based on request here: diff --git a/module/dataset/module.py b/module/dataset/module.py index f66ac2f..4d27540 100644 --- a/module/dataset/module.py +++ b/module/dataset/module.py @@ -370,12 +370,13 @@ def add(i): p=r['path'] # Copy file - pn=os.path.join(p,fn1) + if fn!='': + pn=os.path.join(p,fn1) - if o=='con': - ck.out('') - ck.out('Copying file '+fn+' to '+pn+' ...') + if o=='con': + ck.out('') + ck.out('Copying file '+fn+' to '+pn+' ...') - shutil.copyfile(fn,pn) + shutil.copyfile(fn,pn) return r