Skip to content

Commit 500c906

Browse files
committed
Compatibility for mac: home is at /Users
1 parent a475347 commit 500c906

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ImFileDialog.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,11 @@ namespace ifd {
413413
uid = geteuid();
414414
pw = getpwuid(uid);
415415
if (pw) {
416+
#ifdef __APPLE__
417+
std::string homePath = "/Users/" + std::string(pw->pw_name);
418+
#else
416419
std::string homePath = "/home/" + std::string(pw->pw_name);
417-
420+
#endif
418421
if (std::filesystem::exists(homePath, ec))
419422
quickAccess->Children.push_back(new FileTreeNode(homePath));
420423
if (std::filesystem::exists(homePath + "/Desktop", ec))

0 commit comments

Comments
 (0)