projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
swaroop: fall back to home directory if the content directory is not present.
[dcpomatic.git]
/
src
/
lib
/
cross.cc
diff --git
a/src/lib/cross.cc
b/src/lib/cross.cc
index 61b150a3b68fe05526a8a81aa60ff024a414cc6c..b9b2153030d81dc66f63382101f0c1f4848c3c15 100644
(file)
--- a/
src/lib/cross.cc
+++ b/
src/lib/cross.cc
@@
-463,3
+463,14
@@
maybe_open_console ()
}
}
#endif
+
+boost::filesystem::path
+home_directory ()
+{
+#if defined(DCPOMATIC_LINUX) || defined(DCPOMATIC_OSX)
+ return getenv("HOME");
+#endif
+#ifdef DCPOMATIC_WINDOWS
+ return getenv("HOMEDRIVE") / getenv("HOMEPATH");
+#endif
+}