Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
fix(plot): update to keep console clean of red entries
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoishi committed Sep 28, 2022
1 parent dfcca2c commit 99af05a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/pages/SetupPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,14 +288,6 @@ export default defineComponent({
this.$router.replace({ name: 'plottingProgress' });
},
async updateDriveStats() {
const dirExists = await native.dirExists(this.store.plotPath);
if (!dirExists) {
await tauri.fs.createDir(this.store.plotPath).catch((error) => {
util.errorLogger(error);
});
}
const stats = await native.driveStats(this.store.plotPath);
util.infoLogger('Drive Stats -> free: ' + stats.freeBytes + '; total: ' + stats.totalBytes);
this.driveStats = stats;
Expand All @@ -309,6 +301,15 @@ export default defineComponent({
if (result) {
this.store.setPlotPath(result);
}
const dirExists = await native.dirExists(this.store.plotPath);
if (!dirExists) {
await tauri.fs.createDir(this.store.plotPath).catch((error) => {
util.errorLogger(error);
});
}
await this.updateDriveStats();
},
}
Expand Down

0 comments on commit 99af05a

Please sign in to comment.