]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Do not replace drag&drop'd file's path with unpacked single disk image files.
authorToni Wilen <twilen@winuae.net>
Sun, 8 Oct 2023 15:58:50 +0000 (18:58 +0300)
committerToni Wilen <twilen@winuae.net>
Sun, 8 Oct 2023 15:58:50 +0000 (18:58 +0300)
od-win32/win32gui.cpp

index 1556dcf0bb395d31cebe66cdac83471a3782a96a..04fa3b02291ca13ce1e3ae55f46e70f84706cdc1 100644 (file)
@@ -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);
                                                }
                                        }