Skip to content

Commit

Permalink
fix(gDriveSync): initial creation of backup file
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Mar 10, 2018
1 parent 3d78546 commit e75e3d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app-src/scripts/main/global-services/google-drive-sync-s.js
Expand Up @@ -154,8 +154,14 @@
}

saveTo() {
const defer = this.$q.defer();
// when we have no backup file we create one directly
if (!this.data.backupDocId) {
this.SimpleToast('INFO', 'GoogleDriveSync: Creating new file for backups, as none was found');
return this._save();
}

// otherwise update
const defer = this.$q.defer();
this.GoogleApi.getFileInfo(this.data.backupDocId)
.then((res) => {
const lastModifiedRemote = res.data.modifiedDate;
Expand Down

0 comments on commit e75e3d4

Please sign in to comment.