Browse Source

No longer use short paths for assets on Windows.

tags/v2.0.0
Andrew Belt 5 years ago
parent
commit
23e94f8ae1
1 changed files with 2 additions and 8 deletions
  1. +2
    -8
      src/asset.cpp

+ 2
- 8
src/asset.cpp View File

@@ -66,10 +66,7 @@ static void initSystemDir() {
assert(length > 0); assert(length > 0);
// Get folder of executable // Get folder of executable
PathRemoveFileSpecW(moduleBufW); PathRemoveFileSpecW(moduleBufW);
// Convert to short path to avoid Unicode
wchar_t moduleBufShortW[MAX_PATH];
GetShortPathNameW(moduleBufW, moduleBufShortW, LENGTHOF(moduleBufShortW));
systemDir = string::fromWstring(moduleBufShortW);
systemDir = string::fromWstring(moduleBufW);
#endif #endif
#if defined ARCH_LIN #if defined ARCH_LIN
// Users should launch Rack from their terminal in the system directory // Users should launch Rack from their terminal in the system directory
@@ -92,10 +89,7 @@ static void initUserDir() {
wchar_t documentsBufW[MAX_PATH] = L"."; wchar_t documentsBufW[MAX_PATH] = L".";
HRESULT result = SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBufW); HRESULT result = SHGetFolderPathW(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, documentsBufW);
assert(result == S_OK); assert(result == S_OK);
// Convert to short path to avoid Unicode
wchar_t documentsBufShortW[MAX_PATH];
GetShortPathNameW(documentsBufW, documentsBufShortW, LENGTHOF(documentsBufShortW));
userDir = string::fromWstring(documentsBufShortW);
userDir = string::fromWstring(documentsBufW);
userDir += "/Rack"; userDir += "/Rack";
#endif #endif
#if defined ARCH_MAC #if defined ARCH_MAC


Loading…
Cancel
Save