mirror of
https://github.com/stashapp/stash.git
synced 2025-12-16 20:07:05 +03:00
Improved/fixed macOS support (#4153)
* Fix macOS notifications * Change CFBundleIdentifier to match domain * Distribute Stash.app * Also build universal phasher binary * Fix binary name in check_version.go * Expose GOOS, working dir and home dir in systemStatus endpoint * Disable setup in working directory when running Stash.app * More Makefile improvements, remove unused scripts * Improve READMEs and documentation
This commit is contained in:
@@ -45,6 +45,16 @@ func IsPathInDirs(dirs []string, pathToCheck string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// GetWorkingDirectory returns the current working directory.
|
||||
func GetWorkingDirectory() string {
|
||||
ret, err := os.Getwd()
|
||||
if err != nil {
|
||||
// if we can't get cwd for whatever reason, just return "."
|
||||
ret = "."
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetHomeDirectory returns the path of the user's home directory. ~ on Unix and C:\Users\UserName on Windows
|
||||
func GetHomeDirectory() string {
|
||||
currentUser, err := user.Current()
|
||||
|
||||
Reference in New Issue
Block a user