1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-02 21:11:22 +00:00

Refactored ExeIconFileOnly message.

This commit is contained in:
Cory Smith 2022-08-26 22:45:38 -05:00
parent 74a6b3de35
commit 96915d1f16

View file

@ -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