Browse Source

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

v6.1.6
attila 3 years ago
parent
commit
a2cc9a8cd5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      modules/juce_core/native/juce_win32_Files.cpp

+ 2
- 1
modules/juce_core/native/juce_win32_Files.cpp 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


Loading…
Cancel
Save