Browse Source

UI: Use absolute path for portable mode multi check

Matt Gajownik 5 years ago
parent
commit
8ad61c0c67
1 changed files with 4 additions and 1 deletions
  1. 4 1
      UI/platform-windows.cpp

+ 4 - 1
UI/platform-windows.cpp

@@ -300,10 +300,13 @@ RunOnceMutex GetRunOnceMutex(bool &already_running)
 		name = "OBSStudioCore";
 		name = "OBSStudioCore";
 	} else {
 	} else {
 		char path[500];
 		char path[500];
+		char absPath[512];
 		*path = 0;
 		*path = 0;
+		*absPath = 0;
 		GetConfigPath(path, sizeof(path), "");
 		GetConfigPath(path, sizeof(path), "");
+		os_get_abs_path(path, absPath, sizeof(absPath));
 		name = "OBSStudioPortable";
 		name = "OBSStudioPortable";
-		name += path;
+		name += absPath;
 	}
 	}
 
 
 	BPtr<wchar_t> wname;
 	BPtr<wchar_t> wname;