Skip to content

Commit

Permalink
feat(tpath): add linux desktop client paths
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Sep 2, 2023
1 parent 8828fcf commit 4da6c41
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pkg/tpath/tpath_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ func desktopAppData(homedir string) []string {
}
}

return []string{filepath.Join(homedir, ".local", "share", AppName)}
path := make([]string, 0)

prefix := filepath.Join(homedir, ".local", "share")
path = append(path,
filepath.Join(prefix, AppName),
// https://github.com/iyear/tdl/issues/92#issuecomment-1699307412
filepath.Join(prefix, "KotatogramDesktop"),
filepath.Join(prefix, "64Gram"),
)

if t, err := filepath.Glob("~/snap/telegram-desktop/*/.local/share/TelegramDesktop"); err == nil {
path = append(path, t...)
}

return path
}

0 comments on commit 4da6c41

Please sign in to comment.