From f7fb91feddd29a4ce047a039e5744621ed7e6d04 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 8 Oct 2023 18:58:50 +0300 Subject: [PATCH] Do not replace drag&drop'd file's path with unpacked single disk image files. --- od-win32/win32gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 1556dcf0..04fa3b02 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -22516,7 +22516,8 @@ int dragdrop (HWND hDlg, HDROP hd, struct uae_prefs *prefs, int currentpage) if (type == ZFILE_ROM) { rd = getromdatabyzfile (z); } - if (type > 0) { + // replace with decrunched path but only if decrunched path is deeper (longer) + if (type > 0 && _tcslen(z->name) > _tcslen(file)) { _tcscpy(filepath, z->name); } } -- 2.47.3