Skip to content

Commit

Permalink
If the file starts with ld-, we don't want to patch it
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Nov 3, 2024
1 parent 46bd414 commit 247d2a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/appimagetool/appdirtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,10 @@ func patchRpathsInElf(appdir helpers.AppDir, libraryLocationsInAppDir []string,
}

// If the file starts with ld-, we don't want to patch it
basePath, err := filepath.Base(path)
if err != nil {
helpers.PrintError("filepath.Base", err)
return
}
basePath := filepath.Base(path)
log.Println("Checking whether", basePath, "starts with ld-")
if strings.HasPrefix(basePath, "ld-") {
log.Println("Not writing rpath because file is ld-")
log.Println("Not patching rpath because file starts with ld-")
} else {
// Call patchelf to set the rpath
if helpers.Exists(path) == true {
Expand Down

0 comments on commit 247d2a5

Please sign in to comment.