mirror of
https://github.com/mudler/luet.git
synced 2025-09-07 10:10:17 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
77b49d9c4a | ||
|
4c3532e3c6 |
@@ -40,7 +40,7 @@ var Verbose bool
|
|||||||
var LockedCommands = []string{"install", "uninstall", "upgrade"}
|
var LockedCommands = []string{"install", "uninstall", "upgrade"}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LuetCLIVersion = "0.14.5"
|
LuetCLIVersion = "0.14.6"
|
||||||
LuetEnvPrefix = "LUET"
|
LuetEnvPrefix = "LUET"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -390,15 +390,15 @@ func tarModifierWrapperFunc(dst, path string, header *tar.Header, content io.Rea
|
|||||||
f, err := os.Lstat(destPath)
|
f, err := os.Lstat(destPath)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
Debug("File exists already, computing hash for", destPath)
|
Debug("File exists already, computing hash for", destPath)
|
||||||
hash, err := hashFileContent(destPath)
|
hash, herr := hashFileContent(destPath)
|
||||||
if err == nil {
|
if herr == nil {
|
||||||
existingHash = hash
|
existingHash = hash
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug("Existing file hash: ", existingHash, "Tar file hashsum: ", tarHash)
|
Debug("Existing file hash: ", existingHash, "Tar file hashsum: ", tarHash)
|
||||||
// We want to protect file only if the hash of the files are differing OR the file size are
|
// We want to protect file only if the hash of the files are differing OR the file size are
|
||||||
differs := (existingHash != "" && existingHash != tarHash) || header.Size != f.Size()
|
differs := (existingHash != "" && existingHash != tarHash) || (err != nil && f != nil && header.Size != f.Size())
|
||||||
// Check if exists
|
// Check if exists
|
||||||
if helpers.Exists(destPath) && differs {
|
if helpers.Exists(destPath) && differs {
|
||||||
for i := 1; i < 1000; i++ {
|
for i := 1; i < 1000; i++ {
|
||||||
|
Reference in New Issue
Block a user