| ... | ... | @@ -1747,8 +1747,14 @@ Error os_get_app_data_dir(Buf *out_path, const char *appname) { |
| 1747 | 1747 | // TODO use /etc/passwd |
| 1748 | 1748 | return ErrorFileNotFound; |
| 1749 | 1749 | } |
| 1750 | | buf_resize(out_path, 0); |
| 1751 | | buf_appendf(out_path, "%s/.local/share/%s", home_dir, appname); |
| 1750 | if (home_dir[0] == 0) { |
| 1751 | return ErrorFileNotFound; |
| 1752 | } |
| 1753 | buf_init_from_str(out_path, home_dir); |
| 1754 | if (buf_ptr(out_path)[buf_len(out_path) - 1] != '/') { |
| 1755 | buf_append_char(out_path, '/'); |
| 1756 | } |
| 1757 | buf_appendf(out_path, ".local/share/%s", appname); |
| 1752 | 1758 | return ErrorNone; |
| 1753 | 1759 | #endif |
| 1754 | 1760 | } |