mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 06:27:43 +00:00
use of reliable constant rather then iffy macro
This commit is contained in:
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: a2d040aeb4...5074381533
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: 9b0355be45...fe9b475681
@@ -505,7 +505,7 @@ std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations()
|
|||||||
{
|
{
|
||||||
hecl::Sstat theStat;
|
hecl::Sstat theStat;
|
||||||
const char* home = getenv("HOME");
|
const char* home = getenv("HOME");
|
||||||
|
|
||||||
if (home)
|
if (home)
|
||||||
{
|
{
|
||||||
ret.push_back(NameFromPath(home));
|
ret.push_back(NameFromPath(home));
|
||||||
@@ -514,7 +514,7 @@ std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations()
|
|||||||
if (!hecl::Stat(desktop.c_str(), &theStat))
|
if (!hecl::Stat(desktop.c_str(), &theStat))
|
||||||
ret.push_back(NameFromPath(desktop));
|
ret.push_back(NameFromPath(desktop));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get mounted volumes better method OSX 10.6 and higher, see: */
|
/* Get mounted volumes better method OSX 10.6 and higher, see: */
|
||||||
/*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/
|
/*https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFURLRef/Reference/reference.html*/
|
||||||
/* we get all volumes sorted including network and do not relay on user-defined finder visibility, less confusing */
|
/* we get all volumes sorted including network and do not relay on user-defined finder visibility, less confusing */
|
||||||
@@ -525,13 +525,13 @@ std::vector<std::pair<hecl::SystemString, std::string>> GetSystemLocations()
|
|||||||
|
|
||||||
while (result != kCFURLEnumeratorEnd)
|
while (result != kCFURLEnumeratorEnd)
|
||||||
{
|
{
|
||||||
char defPath[MAXPATHLEN];
|
char defPath[1024];
|
||||||
|
|
||||||
result = CFURLEnumeratorGetNextURL(volEnum, &cfURL, NULL);
|
result = CFURLEnumeratorGetNextURL(volEnum, &cfURL, NULL);
|
||||||
if (result != kCFURLEnumeratorSuccess)
|
if (result != kCFURLEnumeratorSuccess)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CFURLGetFileSystemRepresentation(cfURL, false, (UInt8 *)defPath, MAXPATHLEN);
|
CFURLGetFileSystemRepresentation(cfURL, false, (UInt8 *)defPath, 1024);
|
||||||
ret.push_back(NameFromPath(defPath));
|
ret.push_back(NameFromPath(defPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user