From 96915d1f16adcbde484028a93dd0e5c016c21c75 Mon Sep 17 00:00:00 2001 From: Cory Smith Date: Fri, 26 Aug 2022 22:45:38 -0500 Subject: [PATCH] Refactored ExeIconFileOnly message. --- source/qb64.bas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/qb64.bas b/source/qb64.bas index ea271d60a..bf4c8fd7b 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -3383,18 +3383,22 @@ DO ELSE IF LEN(ideprogname) THEN IconPath$ = idepath$ + pathsep$ END IF + ExeIconFile$ = IconPath$ + MID$(ExeIconFile$, 3) ELSEIF INSTR(ExeIconFile$, "/") OR INSTR(ExeIconFile$, "\") THEN FOR i = LEN(ExeIconFile$) TO 1 STEP -1 IF MID$(ExeIconFile$, i, 1) = "/" OR MID$(ExeIconFile$, i, 1) = "\" THEN IconPath$ = LEFT$(ExeIconFile$, i) - ExeIconFile$ = MID$(ExeIconFile$, i + 1) - IF _DIREXISTS(IconPath$) = 0 THEN a$ = "File '" + ExeIconFile$ + "' not found": GOTO errmes + ExeIconFileOnly$ = MID$(ExeIconFile$, i + 1) + + IF _DIREXISTS(IconPath$) = 0 THEN a$ = "File '" + ExeIconFileOnly$ + "' not found": GOTO errmes + currentdir$ = _CWD$ CHDIR IconPath$ IconPath$ = _CWD$ CHDIR currentdir$ - ExeIconFile$ = IconPath$ + pathsep$ + ExeIconFile$ + + ExeIconFile$ = IconPath$ + pathsep$ + ExeIconFileOnly$ EXIT FOR END IF NEXT