mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-19 00:27:06 +00:00
Not able to update I-E on mac GODT-794
Added missing signal, corrected the update name, log tweaks.
This commit is contained in:
@ -10,6 +10,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
* GODT-677 Windows IE: global import settings not fit in window.
|
* GODT-677 Windows IE: global import settings not fit in window.
|
||||||
|
* GODT-794 Congo fails to update to Danube
|
||||||
* GODT-749 Don't force PGP/Inline when sending plaintext messages.
|
* GODT-749 Don't force PGP/Inline when sending plaintext messages.
|
||||||
* GODT-764 Fix deadlock in integration tests for Import-Export.
|
* GODT-764 Fix deadlock in integration tests for Import-Export.
|
||||||
* GODT-662 Do not resume paused transfer progress after dismissing cancel popup.
|
* GODT-662 Do not resume paused transfer progress after dismissing cancel popup.
|
||||||
|
|||||||
@ -276,6 +276,10 @@ Item {
|
|||||||
winMain.dialogExport.hide()
|
winMain.dialogExport.hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUpdateFinished : {
|
||||||
|
winMain.dialogUpdate.finished(hasError)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function folderIcon(folderName, folderType) { // translations
|
function folderIcon(folderName, folderType) { // translations
|
||||||
|
|||||||
@ -45,7 +45,7 @@ func syncFolders(localPath, updatePath string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func removeMissing(folderToCleanPath, itemsToKeepPath string) (err error) {
|
func removeMissing(folderToCleanPath, itemsToKeepPath string) (err error) {
|
||||||
log.Debug("remove missing")
|
log.WithField("from", folderToCleanPath).Debug("Remove missing.")
|
||||||
// Create list of files.
|
// Create list of files.
|
||||||
existingRelPaths := map[string]bool{}
|
existingRelPaths := map[string]bool{}
|
||||||
err = filepath.Walk(itemsToKeepPath, func(keepThis string, _ os.FileInfo, walkErr error) error {
|
err = filepath.Walk(itemsToKeepPath, func(keepThis string, _ os.FileInfo, walkErr error) error {
|
||||||
@ -56,7 +56,7 @@ func removeMissing(folderToCleanPath, itemsToKeepPath string) (err error) {
|
|||||||
if walkErr != nil {
|
if walkErr != nil {
|
||||||
return walkErr
|
return walkErr
|
||||||
}
|
}
|
||||||
log.Debug("path to keep ", relPath)
|
log.WithField("path", relPath).Trace("Keep the path.")
|
||||||
existingRelPaths[relPath] = true
|
existingRelPaths[relPath] = true
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
@ -95,12 +95,18 @@ func removeMissing(folderToCleanPath, itemsToKeepPath string) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func restoreFromBackup(backupDir, localPath string) {
|
func restoreFromBackup(backupDir, localPath string) {
|
||||||
log.Error("recovering from ", backupDir, " to ", localPath)
|
log.WithField("from", backupDir).
|
||||||
_ = copyRecursively(backupDir, localPath)
|
WithField("to", localPath).
|
||||||
|
Error("recovering")
|
||||||
|
if err := copyRecursively(backupDir, localPath); err != nil {
|
||||||
|
log.WithField("from", backupDir).
|
||||||
|
WithField("to", localPath).
|
||||||
|
Error("Not able to recover.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func createBackup(srcFile, dstDir string) (err error) {
|
func createBackup(srcFile, dstDir string) (err error) {
|
||||||
log.Debug("backup ", srcFile, " in ", dstDir)
|
log.WithField("from", srcFile).WithField("to", dstDir).Debug("Create backup")
|
||||||
if err = mkdirAllClear(dstDir); err != nil {
|
if err = mkdirAllClear(dstDir); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ func NewImportExport(updateTempDir string) *Updates {
|
|||||||
versionFileBaseName: "current_version_ie",
|
versionFileBaseName: "current_version_ie",
|
||||||
updateFileBaseName: "ie/ie_upgrade",
|
updateFileBaseName: "ie/ie_upgrade",
|
||||||
linuxFileBaseName: "ie/protonmail-import-export-app",
|
linuxFileBaseName: "ie/protonmail-import-export-app",
|
||||||
macAppBundleName: "Import-Export app.app",
|
macAppBundleName: "ProtonMail Import-Export app.app",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,10 +328,15 @@ func (u *Updates) StartUpgrade(currentStatus chan<- Progress) { // nolint[funlen
|
|||||||
localPath = filepath.Dir(localPath) // .app
|
localPath = filepath.Dir(localPath) // .app
|
||||||
|
|
||||||
updatePath := filepath.Join(u.updateTempDir, u.macAppBundleName)
|
updatePath := filepath.Join(u.updateTempDir, u.macAppBundleName)
|
||||||
log.Warn("localPath ", localPath)
|
log.WithField("local", localPath).
|
||||||
log.Warn("updatePath ", updatePath)
|
WithField("update", updatePath).
|
||||||
|
Info("Syncing folders..")
|
||||||
status.Err = syncFolders(localPath, updatePath)
|
status.Err = syncFolders(localPath, updatePath)
|
||||||
if status.Err != nil {
|
if status.Err != nil {
|
||||||
|
log.WithField("from", localPath).
|
||||||
|
WithField("to", updatePath).
|
||||||
|
WithError(status.Err).
|
||||||
|
Error("Sync failed.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
status.UpdateDescription(InfoRestartApp)
|
status.UpdateDescription(InfoRestartApp)
|
||||||
|
|||||||
Reference in New Issue
Block a user