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

Commit

Permalink
fix(plot): create plot folder if not found, reframe file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dnoishi committed Sep 28, 2022
1 parent 285bca6 commit dfcca2c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/pages/SetupPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export default defineComponent({
if (files) {
console.log('FILES ARE: :', files);
if (files.length === 0 || (files.length === 1 && files.some(item => item.name === 'subspace-desktop.cfg'))) {
if (files.length === 0) {
directoryDialogs.existingDirectoryConfirm(this.store.plotPath, this.startPlotting);
// we are in FIRST TIME START, meaning there is are no existing plot
// if there are some files in this folder, it's weird
Expand Down Expand Up @@ -288,6 +288,14 @@ 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 Down

0 comments on commit dfcca2c

Please sign in to comment.