go-appimage icon indicating copy to clipboard operation
go-appimage copied to clipboard

Double slash in folder path

Open trumpton opened this issue 3 years ago • 2 comments

ERROR integrate: rename /home/steve/.cache/applications//appimagekit_d4d61be6549e56e0a33a8ef883149b25.desktop /home/steve/.local/share/applications/appimagekit_d4d61be6549e56e0a33a8ef88

There is a double slash in the source of the cache folder - this is linked to the hard-coded /applications/ folder.

appimaged.go:

desktopcachedir := xdg.CacheHome + "/applications**/**" // FIXME: Do not hardcode here and in other places
...
err := os.Rename(desktopcachedir+"**/**appimagekit_"+ai.md5+".desktop", ai.desktopfilepath)
...
log.Println("main: Moved ", desktopcachedir+"**/**appimagekit_"+ai.md5+".desktop to", xdg.DataHome+"/applications/")

trumpton avatar Jun 25 '22 12:06 trumpton

These paths should probably be replaced with filepath.Join to make sure this doesn't happen. I'm guessing this is due to the distro your using adding a trailing slash to CacheHome while the distros that we official test with do not.

CalebQ42 avatar Jun 25 '22 18:06 CalebQ42

filepath.Join would be the way to go; does anyone want to send a PR?

probonopd avatar Jun 27 '22 18:06 probonopd