Fix warning

This commit is contained in:
Tom Ritchford
2015-06-18 15:24:10 -04:00
committed by Vinnie Falco
parent fdd2ea8feb
commit 0062a260b9

View File

@@ -67,6 +67,21 @@ File File::getCurrentWorkingDirectory()
return File (CharPointer_UTF8 (cwd)); return File (CharPointer_UTF8 (cwd));
} }
// if this file doesn't exist, find a parent of it that does..
inline
bool beast_doStatFS (File f, struct statfs& result)
{
for (int i = 5; --i >= 0;)
{
if (f.exists())
break;
f = f.getParentDirectory();
}
return statfs (f.getFullPathName().toUTF8(), &result) == 0;
}
//============================================================================== //==============================================================================
namespace namespace
{ {
@@ -85,20 +100,6 @@ namespace
&& BEAST_STAT (fileName.toUTF8(), &info) == 0; && BEAST_STAT (fileName.toUTF8(), &info) == 0;
} }
// if this file doesn't exist, find a parent of it that does..
bool beast_doStatFS (File f, struct statfs& result)
{
for (int i = 5; --i >= 0;)
{
if (f.exists())
break;
f = f.getParentDirectory();
}
return statfs (f.getFullPathName().toUTF8(), &result) == 0;
}
void updateStatInfoForFile (const String& path, bool* const isDir, std::int64_t* const fileSize, void updateStatInfoForFile (const String& path, bool* const isDir, std::int64_t* const fileSize,
Time* const modTime, Time* const creationTime, bool* const isReadOnly) Time* const modTime, Time* const creationTime, bool* const isReadOnly)
{ {