Skip to content

Commit

Permalink
Merge pull request #53 from safing/fix/file-move-upgrading
Browse files Browse the repository at this point in the history
Remove version information from moved file
  • Loading branch information
ppacher authored May 23, 2020
2 parents 8a0edd9 + a4e2d3d commit 6c029d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions updates/upgrader.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ func upgradeFile(fileToUpgrade string, file *updater.File) error {
// test currentVersion for sanity
if !rawVersionRegex.MatchString(currentVersion) {
log.Tracef("updates: version string returned by %s is invalid: %s", fileToUpgrade, currentVersion)
currentVersion = "0.0.0"
}

// try removing old version
Expand All @@ -192,7 +191,7 @@ func upgradeFile(fileToUpgrade string, file *updater.File) error {
registry.TmpDir().Path,
fmt.Sprintf(
"%s-%d%s",
updater.GetVersionedPath(filepath.Base(fileToUpgrade), currentVersion),
filepath.Base(fileToUpgrade),
time.Now().UTC().Unix(),
upgradedSuffix,
),
Expand Down

0 comments on commit 6c029d0

Please sign in to comment.