Browse Source

Windows: Fixed an issue where File::getLinkedTarget could return an invalid File object on Windows although the docs state that it will return the link file itself if the link cannot be resolved

tags/2021-05-28
hogliux ed 7 years ago
parent
commit
71860c88e4
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      modules/juce_core/native/juce_win32_Files.cpp

+ 6
- 1
modules/juce_core/native/juce_win32_Files.cpp View File

@@ -840,7 +840,12 @@ String File::getNativeLinkedTarget() const
File File::getLinkedTarget() const
{
return readWindowsShortcutOrLink (*this, true);
auto target = readWindowsShortcutOrLink (*this, true);
if (target.isNotEmpty() && File::isAbsolutePath (target))
return File (target);
return *this;
}
bool File::createShortcut (const String& description, const File& linkFileToCreate) const


Loading…
Cancel
Save