Skip to content

Commit

Permalink
Update bios_vhd.cpp
Browse files Browse the repository at this point in the history
try to fix realpath use on non-Windows platforms
  • Loading branch information
maxpat78 authored Aug 3, 2024
1 parent 8935f11 commit 7956f0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ints/bios_vhd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,11 @@ uint32_t imageDiskVHD::CreateDifferencing(const char* filename, const char* base

//Locators - Windows 11 wants at least the relative W2ru locator, or won't mount!
// we store the absolute pathname to prevent complex depth calculations
char absBasePathName[MAX_PATH];
#if defined (WIN32)
char absBasePathName[MAX_PATH];
_fullpath(absBasePathName, basename, MAX_PATH);
#else
char absBasePathName[PATH_MAX];
realpath(basename, absBasePathName);
#endif
uint32_t l_basename = strlen(absBasePathName);
Expand Down

0 comments on commit 7956f0b

Please sign in to comment.