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:
parent
967fc1cc24
commit
a2cc9a8cd5
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue