1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

File: Fix isSymbolicLink() on Windows when querying non-existing paths

This commit is contained in:
attila 2022-01-12 12:48:04 +01:00
parent 967fc1cc24
commit a2cc9a8cd5

View file

@ -706,7 +706,8 @@ String File::getVersion() const
//==============================================================================
bool File::isSymbolicLink() const
{
return (GetFileAttributes (fullPath.toWideCharPointer()) & FILE_ATTRIBUTE_REPARSE_POINT) != 0;
const auto attributes = WindowsFileHelpers::getAtts (fullPath);
return (attributes != INVALID_FILE_ATTRIBUTES && (attributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0);
}
bool File::isShortcut() const