Skip to content

Commit

Permalink
Revert unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd authored Nov 29, 2024
1 parent 2de98cd commit d42d165
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/appimagetool/appdirtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"path"
"strconv"
"syscall"
"regexp"
"io/ioutil"

"debug/elf"
"os"
Expand Down Expand Up @@ -288,26 +286,7 @@ func AppDirDeploy(path string) {
if strings.HasPrefix(lib, appdir.Path) == false {
lib = appdir.Path + lib
}
// Check if the directory contains at least one file that has ".so" in its name
// followed by either nothing or only digits and dots;
// this is a heuristic to determine whether the directory contains shared libraries
found := false
files, err := ioutil.ReadDir(lib)
if err != nil {
helpers.PrintError("ReadDir", err)
os.Exit(1)
}
for _, file := range files {
if strings.Contains(file.Name(), ".so") && regexp.MustCompile(`\.so(\d|\.)+$`).MatchString(file.Name()) {
found = true
break
}
}
if found {
libraryLocationsInAppDir = helpers.AppendIfMissing(libraryLocationsInAppDir, lib)
} else {
log.Println("Not adding", lib, "to libraryLocationsInAppDir because it does not contain shared libraries")
}
libraryLocationsInAppDir = helpers.AppendIfMissing(libraryLocationsInAppDir, lib)
}
fmt.Println("")

Expand Down

0 comments on commit d42d165

Please sign in to comment.