mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
Fix AppImage share path
This commit is contained in:
parent
a45fd094ad
commit
18fe4375d4
@ -16,15 +16,16 @@
|
||||
|
||||
void set_appimage_symlink(char* argv0)
|
||||
{
|
||||
char* path = strdup(argv0);
|
||||
char* path = realpath("/proc/self/exe", NULL);
|
||||
char* i = strrchr(path, '/');
|
||||
*(i+1) = '\0';
|
||||
char* dest = strcat(path, "usr/");
|
||||
char* dest = strcat(path, "../");
|
||||
struct stat buf;
|
||||
if (lstat(PREFIX, &buf) == 0 && S_ISLNK(buf.st_mode)) {
|
||||
remove(PREFIX);
|
||||
}
|
||||
symlink(dest, PREFIX);
|
||||
printf("'%s' '%s' '%s'\n", path, i, dest);
|
||||
free(path);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user