diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-01-20 18:13:22 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-01-20 18:13:22 -0500 |
| commit | 423a29bff247ecce00bc5383b28fa7624ef67dcf (patch) | |
| tree | b09a76f5ae93c2205596df94ccfb15c6528ee05d | |
| parent | 8feb35ed7d126df13ad935f8bf6c5e752f49724e (diff) | |
Fix tilde paths
| -rwxr-xr-x | nowopen | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -16,7 +16,8 @@ -- sun: closed -- -local XDG_DATA_HOME = os.getenv("XDG_DATA_HOME") or "~/.local/share" +local HOME = os.getenv("HOME") +local XDG_DATA_HOME = os.getenv("XDG_DATA_HOME") or (HOME.."/.local/share") if arg[1] == '-w' or arg[1] == '--where' then print(XDG_DATA_HOME..'/nowopen/businesshours') os.exit(0) @@ -25,7 +26,7 @@ elseif arg[1] == '-e' or arg[1] == '--edit' then os.execute(editor.." "..XDG_DATA_HOME..'/nowopen/businesshours') os.exit(0) end -local f = io.open(XDG_DATA_HOME..'/nowopen/businesshours') or io.open('~/.businesshours') +local f = io.open(XDG_DATA_HOME..'/nowopen/businesshours') or io.open(HOME..'/.businesshours') if not f then print("Could not find config file.\n" .."Please create a config file in either " |
