Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double slash in folder path #214

Open
trumpton opened this issue Jun 25, 2022 · 2 comments
Open

Double slash in folder path #214

trumpton opened this issue Jun 25, 2022 · 2 comments

Comments

@trumpton
Copy link

trumpton commented Jun 25, 2022

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/")
@CalebQ42
Copy link
Contributor

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.

@probonopd
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants