mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
Merge pull request #53 from safing/fix/file-move-upgrading
Remove version information from moved file
This commit is contained in:
commit
6c029d0ce3
1 changed files with 1 additions and 2 deletions
|
@ -175,7 +175,6 @@ func upgradeFile(fileToUpgrade string, file *updater.File) error {
|
||||||
// test currentVersion for sanity
|
// test currentVersion for sanity
|
||||||
if !rawVersionRegex.MatchString(currentVersion) {
|
if !rawVersionRegex.MatchString(currentVersion) {
|
||||||
log.Tracef("updates: version string returned by %s is invalid: %s", fileToUpgrade, currentVersion)
|
log.Tracef("updates: version string returned by %s is invalid: %s", fileToUpgrade, currentVersion)
|
||||||
currentVersion = "0.0.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// try removing old version
|
// try removing old version
|
||||||
|
@ -192,7 +191,7 @@ func upgradeFile(fileToUpgrade string, file *updater.File) error {
|
||||||
registry.TmpDir().Path,
|
registry.TmpDir().Path,
|
||||||
fmt.Sprintf(
|
fmt.Sprintf(
|
||||||
"%s-%d%s",
|
"%s-%d%s",
|
||||||
updater.GetVersionedPath(filepath.Base(fileToUpgrade), currentVersion),
|
filepath.Base(fileToUpgrade),
|
||||||
time.Now().UTC().Unix(),
|
time.Now().UTC().Unix(),
|
||||||
upgradedSuffix,
|
upgradedSuffix,
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue