| ... | ... | @@ -45,6 +45,10 @@ pub fn getAppDataDir(allocator: mem.Allocator, appname: []const u8) GetAppDataDi |
| 45 | 45 | return fs.path.join(allocator, &[_][]const u8{ home_dir, "Library", "Application Support", appname }); |
| 46 | 46 | }, |
| 47 | 47 | .linux, .freebsd, .netbsd, .dragonfly, .openbsd, .solaris => { |
| 48 | if (os.getenv("XDG_DATA_HOME")) |xdg| { |
| 49 | return fs.path.join(allocator, &[_][]const u8{ xdg, appname }); |
| 50 | } |
| 51 | |
| 48 | 52 | const home_dir = os.getenv("HOME") orelse { |
| 49 | 53 | // TODO look in /etc/passwd |
| 50 | 54 | return error.AppDataDirUnavailable; |