1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-05 01:50:25 +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 ELSE
IF LEN(ideprogname) THEN IconPath$ = idepath$ + pathsep$ IF LEN(ideprogname) THEN IconPath$ = idepath$ + pathsep$
END IF END IF
ExeIconFile$ = IconPath$ + MID$(ExeIconFile$, 3) ExeIconFile$ = IconPath$ + MID$(ExeIconFile$, 3)
ELSEIF INSTR(ExeIconFile$, "/") OR INSTR(ExeIconFile$, "\") THEN ELSEIF INSTR(ExeIconFile$, "/") OR INSTR(ExeIconFile$, "\") THEN
FOR i = LEN(ExeIconFile$) TO 1 STEP -1 FOR i = LEN(ExeIconFile$) TO 1 STEP -1
IF MID$(ExeIconFile$, i, 1) = "/" OR MID$(ExeIconFile$, i, 1) = "\" THEN IF MID$(ExeIconFile$, i, 1) = "/" OR MID$(ExeIconFile$, i, 1) = "\" THEN
IconPath$ = LEFT$(ExeIconFile$, i) IconPath$ = LEFT$(ExeIconFile$, i)
ExeIconFile$ = MID$(ExeIconFile$, i + 1) ExeIconFileOnly$ = MID$(ExeIconFile$, i + 1)
IF _DIREXISTS(IconPath$) = 0 THEN a$ = "File '" + ExeIconFile$ + "' not found": GOTO errmes
IF _DIREXISTS(IconPath$) = 0 THEN a$ = "File '" + ExeIconFileOnly$ + "' not found": GOTO errmes
currentdir$ = _CWD$ currentdir$ = _CWD$
CHDIR IconPath$ CHDIR IconPath$
IconPath$ = _CWD$ IconPath$ = _CWD$
CHDIR currentdir$ CHDIR currentdir$
ExeIconFile$ = IconPath$ + pathsep$ + ExeIconFile$
ExeIconFile$ = IconPath$ + pathsep$ + ExeIconFileOnly$
EXIT FOR EXIT FOR
END IF END IF
NEXT NEXT