Fix loading game assets in cooked build via path relative to the project folder
This commit is contained in:
@@ -98,11 +98,11 @@ void FileSystemBase::NormalizePath(String& path)
|
||||
}
|
||||
}
|
||||
|
||||
bool FileSystemBase::IsRelative(const String& path)
|
||||
bool FileSystemBase::IsRelative(const StringView& path)
|
||||
{
|
||||
const bool isRooted =
|
||||
(path.Length() >= 2 && StringUtils::IsAlpha(path[0]) && path[1] == ':') ||
|
||||
path.StartsWith(TEXT("\\\\")) ||
|
||||
path.StartsWith(StringView(TEXT("\\\\"), 2), StringSearchCase::CaseSensitive) ||
|
||||
path.StartsWith('/') ||
|
||||
path.StartsWith('\\') ||
|
||||
path.StartsWith('/');
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="path">Input path to check</param>
|
||||
/// <returns>True if input path is relative one, otherwise false</returns>
|
||||
static bool IsRelative(const String& path);
|
||||
static bool IsRelative(const StringView& path);
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves file extension (without a dot)
|
||||
|
||||
Reference in New Issue
Block a user