Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f91ae3b

Browse files
Merge pull request #1019 from runrevsebastien/bugfix-13026-7_0
Bugfix 13026 7 0
2 parents ab97711 + f28fbda commit f91ae3b

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

engine/src/dsklnx.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,16 @@ class MCLinuxDesktop: public MCSystemInterface
14301430
return MCStringCopy(*t_home, r_folder);
14311431
else if (MCNameIsEqualTo(p_type, MCN_temporary, kMCCompareCaseless))
14321432
return MCStringCreateWithCString("/tmp", r_folder);
1433+
// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
1434+
else if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
1435+
{
1436+
uindex_t t_last_slash;
1437+
1438+
if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
1439+
t_last_slash = MCStringGetLength(MCcmd);
1440+
1441+
return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
1442+
}
14331443

14341444
r_folder = MCValueRetain(kMCEmptyString);
14351445
return true;

engine/src/dskmac.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5310,6 +5310,18 @@ struct MCMacDesktop: public MCSystemInterface, public MCMacSystemService
53105310
OSType t_domain = kOnAppropriateDisk;
53115311
bool t_found_folder = false;
53125312

5313+
5314+
// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
5315+
if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
5316+
{
5317+
uindex_t t_last_slash;
5318+
5319+
if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
5320+
t_last_slash = MCStringGetLength(MCcmd);
5321+
5322+
return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
5323+
}
5324+
53135325
if (MCS_mac_specialfolder_to_mac_folder(MCNameGetString(p_type), t_mac_folder, t_domain))
53145326
t_found_folder = true;
53155327
else if (MCStringGetLength(MCNameGetString(p_type)) == 4 &&

engine/src/dskw32.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,6 +2693,16 @@ struct MCWindowsDesktop: public MCSystemInterface, public MCWindowsSystemService
26932693
// ep.commit(strlen(buf));
26942694
//}
26952695
//}
2696+
// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
2697+
else if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
2698+
{
2699+
uindex_t t_last_slash;
2700+
2701+
if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
2702+
t_last_slash = MCStringGetLength(MCcmd);
2703+
2704+
return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
2705+
}
26962706
else
26972707
{
26982708
if (MCNumberParseUnicodeChars(MCStringGetCharPtr(MCNameGetString(p_type)), MCStringGetLength(MCNameGetString(p_type)), &t_special_folder) ||

0 commit comments

Comments
 (0)