File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ void CreateProjectDialogD::OnCreate(wxCommandEvent& event){
8484
8585 // create the command string
8686 #if defined __APPLE__
87- string command = " \" " + executablePath + " \" -createproject \" " + projPath + dirsep + projName + " \" -cloneFromTemplate \" " + executableTemplatesPath + templatePrefix + " ." + templateName + " \" " ;
87+ string command = " \" " + executablePath. string () + " \" -createproject \" " + ( filesystem::path ( projPath) / projName). string () + " \" -cloneFromTemplate \" " + executableTemplatesPath. string () + templatePrefix + " ." + templateName + " \" " ;
8888 #elif defined _WIN32
8989 auto fullProj = std::filesystem::path (" \" " ) / projPath / projName / " \" " ;
9090 auto fullTemplate = std::filesystem::path (" \" " ) / executableTemplatesPath / (templatePrefix + " ." + templateName + " \" " );
Original file line number Diff line number Diff line change @@ -25,18 +25,18 @@ struct editor{
2525#if defined __APPLE__
2626 #include < pwd.h>
2727 // the location to store application data
28- static const std::string datapath = getpwuid(getuid())->pw_dir + std::string( " / Library/Application Support/UnityHubNative" ) ;
28+ static const std::filesystem::path datapath = std::filesystem::path( getpwuid(getuid())->pw_dir) / " Library/Application Support/UnityHubNative" ;
2929 static const char dirsep = ' /' ;
3030
31- static const std::string cachedir = getpwuid(getuid())->pw_dir + std::string( " /Library/Caches/com.ravbug.UnityHubNative/" ) ;
31+ static const std::filesystem::path cachedir = std::filesystem::path( getpwuid(getuid())->pw_dir) / " /Library/Caches/com.ravbug.UnityHubNative/" ;
3232 static const std::string installerExt = " dmg" ;
3333
3434 // where to find various Unity things on macOS
35- static const std::string executable = " Unity.app/Contents/MacOS/Unity" ;
36- static const std::vector<std::string > defaultInstall = {" /Applications/Unity/Hub/Editor" ," /Applications/Unity/" };
35+ static const std::filesystem::path executable = " Unity.app/Contents/MacOS/Unity" ;
36+ static const std::vector<std::filesystem::path > defaultInstall = {" /Applications/Unity/Hub/Editor" ," /Applications/Unity/" };
3737 // TODO: make this a preference?
38- static const std::string hubDefault = " /Applications/Unity Hub.app" ;
39- static const std::string templatesDir = " Unity.app/Contents/Resources/PackageManager/ProjectTemplates/" ;
38+ static const std::filesystem::path hubDefault = " /Applications/Unity Hub.app" ;
39+ static const std::filesystem::path templatesDir = " Unity.app/Contents/Resources/PackageManager/ProjectTemplates/" ;
4040
4141 // for stream redirecting to dev/null
4242 static const std::string null_device = " >/dev/null 2>&1" ;
You can’t perform that action at this time.
0 commit comments