mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
fixed typo in comment & formatting
This commit is contained in:
parent
ce7b843de7
commit
288dbfd0d8
1 changed files with 8 additions and 9 deletions
|
@ -259,16 +259,15 @@ bool instance_check(int argc, char** argv, bool app_config_single_instance)
|
||||||
std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
||||||
#else
|
#else
|
||||||
std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]), ec).string());
|
std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]), ec).string());
|
||||||
if(ec.value() > 0) { // canonical was not able to find execitable (can happen with appimage on some systems)
|
if (ec.value() > 0) { // canonical was not able to find the executable (can happen with appimage on some systems. Does it fail on Fuse file systems?)
|
||||||
ec.clear();
|
ec.clear();
|
||||||
// Compose path with boost canonical of folder and filename
|
// Compose path with boost canonical of folder and filename
|
||||||
hashed_path = std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]).parent_path(), ec).string() + "/" + boost::filesystem::system_complete(argv[0]).filename().string());
|
hashed_path = std::hash<std::string>{}(boost::filesystem::canonical(boost::filesystem::system_complete(argv[0]).parent_path(), ec).string() + "/" + boost::filesystem::system_complete(argv[0]).filename().string());
|
||||||
if(ec.value() > 0) {
|
if (ec.value() > 0) {
|
||||||
// Still not valid, process without canonical
|
// Still not valid, process without canonical
|
||||||
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
hashed_path = std::hash<std::string>{}(boost::filesystem::system_complete(argv[0]).string());
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif // win32
|
#endif // win32
|
||||||
|
|
||||||
std::string lock_name = std::to_string(hashed_path);
|
std::string lock_name = std::to_string(hashed_path);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue