From 84d414a6bf114f5d43403cb924767c1b4bead62e Mon Sep 17 00:00:00 2001 From: James McManus Date: Fri, 7 Jul 2023 16:52:20 -0400 Subject: [PATCH] added filename to findDir path when shutil.move --- kalpana/kalpana.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kalpana/kalpana.py b/kalpana/kalpana.py index 4603fbf..ec4310f 100644 --- a/kalpana/kalpana.py +++ b/kalpana/kalpana.py @@ -382,8 +382,10 @@ def main(args): # create cog # move cog tiff to final directory finalPathFile = glob.glob(outputDir+'*_epsg4326.tif')[0] + finalFile = finalPathFile.split('/')[-1] + try: - shutil.move(finalPathFile, finalDir) + shutil.move(finalPathFile, finalDir+finalFile) logger.info('Created cog file '+finalPathFile+' and move to '+finalDir+' directory.') except OSError as err: logger.error(err)