File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,21 +51,21 @@ func GetUserData() *UserData {
5151
5252// GetDataPath returns the path to the installer's data path.
5353func GetDataPath () string {
54+ dirs := appdir .New ("replugged-installer" )
55+ data := dirs .UserData ()
56+
5457 // We LOVE platform-specific hacks.
5558 // Fixes the running-as-root $HOME issue.
5659 if IsLinux () {
5760 userData := GetUserData ()
5861 if userData .Name != "" {
5962 usr := strings .TrimSuffix (userData .Name , "\n " )
60- return fmt .Sprintf ("/home/%s/.local/share/replugged-installer" , usr )
63+ data = fmt .Sprintf ("/home/%s/.local/share/replugged-installer" , usr )
6164 } else {
6265 return ""
6366 }
6467 }
6568
66- dirs := appdir .New ("replugged-installer" )
67- data := dirs .UserData ()
68-
6969 if err := os .MkdirAll (data , 0755 ); err != nil {
7070 panic (err )
7171 }
You can’t perform that action at this time.
0 commit comments