From 50a27e87fbcd10bb58b4c035b0effcbf51f938c4 Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Thu, 13 Apr 2023 13:30:37 -0500
Subject: [PATCH] Fix thumbnail not being saved to proper output directory

---
 aosstower/level_b1/quicklook.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aosstower/level_b1/quicklook.py b/aosstower/level_b1/quicklook.py
index 7ba728a..73f9cc1 100644
--- a/aosstower/level_b1/quicklook.py
+++ b/aosstower/level_b1/quicklook.py
@@ -431,7 +431,7 @@ def create_plot(plot_names, frame, output, start_time=None, end_time=None, thumb
             out_path = Path(out_fn)
             stem = out_path.stem
             ext = out_path.suffix
-            out_fn = f"{stem}_thumbnail{ext}"
+            out_fn = out_path.parent / f"{stem}_thumbnail{ext}"
             plot_maker.convert_to_thumbnail(fig)
             LOG.info(f"Saving thumbnail '{name}' to filename '{out_fn}'")
             fig.savefig(out_fn)
-- 
GitLab