Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions engine/src/dsklnx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,16 @@ class MCLinuxDesktop: public MCSystemInterface
return MCStringCopy(*t_home, r_folder);
else if (MCNameIsEqualTo(p_type, MCN_temporary, kMCCompareCaseless))
return MCStringCreateWithCString("/tmp", r_folder);
// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
else if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
{
uindex_t t_last_slash;

if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
t_last_slash = MCStringGetLength(MCcmd);

return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
}

r_folder = MCValueRetain(kMCEmptyString);
return true;
Expand Down
12 changes: 12 additions & 0 deletions engine/src/dskmac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5310,6 +5310,18 @@ struct MCMacDesktop: public MCSystemInterface, public MCMacSystemService
OSType t_domain = kOnAppropriateDisk;
bool t_found_folder = false;


// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
{
uindex_t t_last_slash;

if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
t_last_slash = MCStringGetLength(MCcmd);

return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
}

if (MCS_mac_specialfolder_to_mac_folder(MCNameGetString(p_type), t_mac_folder, t_domain))
t_found_folder = true;
else if (MCStringGetLength(MCNameGetString(p_type)) == 4 &&
Expand Down
10 changes: 10 additions & 0 deletions engine/src/dskw32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2693,6 +2693,16 @@ struct MCWindowsDesktop: public MCSystemInterface, public MCWindowsSystemService
// ep.commit(strlen(buf));
//}
//}
// SN-2014-08-08: [[ Bug 13026 ]] Fix ported from 6.7
else if (MCNameIsEqualTo(p_type, MCN_engine, kMCCompareCaseless))
{
uindex_t t_last_slash;

if (!MCStringLastIndexOfChar(MCcmd, '/', UINDEX_MAX, kMCStringOptionCompareExact, t_last_slash))
t_last_slash = MCStringGetLength(MCcmd);

return MCStringCopySubstring(MCcmd, MCRangeMake(0, t_last_slash), r_folder) ? True : False;
}
else
{
if (MCNumberParseUnicodeChars(MCStringGetCharPtr(MCNameGetString(p_type)), MCStringGetLength(MCNameGetString(p_type)), &t_special_folder) ||
Expand Down