Cleanup TOS pages, prepare for new pages
This commit is contained in:
+7
-3
@@ -473,10 +473,14 @@ func AudioEnabled() bool {
|
||||
return on == "true"
|
||||
}
|
||||
|
||||
// resolveAssetsDir returns the assets directory by resolving relative to the
|
||||
// running binary. For a binary at .../bin/rhemawave, assets are at
|
||||
// .../share/rhemawave. Falls back to /usr/local/share/rhemawave.
|
||||
// resolveAssetsDir returns the assets directory. If RHEMAWAVE_ASSETS_DIR is
|
||||
// set, it is used directly (useful for debugging with dlv). Otherwise, it
|
||||
// resolves relative to the running binary: .../bin/rhemawave → .../share/rhemawave.
|
||||
// Falls back to /usr/local/share/rhemawave.
|
||||
func resolveAssetsDir() string {
|
||||
if dir := os.Getenv("RHEMAWAVE_ASSETS_DIR"); dir != "" {
|
||||
return dir
|
||||
}
|
||||
exe, err := os.Executable()
|
||||
if err == nil {
|
||||
exe, err = filepath.EvalSymlinks(exe)
|
||||
|
||||
Reference in New Issue
Block a user