Browse Source

Windows: Fixed a bug in File::getFileIdentifier()

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
8eb626a338
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

@@ -544,7 +544,12 @@ uint64 File::getFileIdentifier() const
{ {
uint64 result = 0; uint64 result = 0;
auto h = CreateFile (getFullPathName().toWideCharPointer(),
String path = getFullPathName();
if (isRoot())
path += "\\";
auto h = CreateFile (path.toWideCharPointer(),
GENERIC_READ, FILE_SHARE_READ, nullptr, GENERIC_READ, FILE_SHARE_READ, nullptr,
OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);


Loading…
Cancel
Save