-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1- With the new changes, the check on line 262 (https://github.com/subspace/subspace-desktop/pull/348/files#diff-e879b9701cf110ae7a5636e48ba2803b2f6a8b808b3539e2937607f7a0200d11R262) won't be necessary anymore. We can simplify that check
2- Here is the bug introduced with these changes:
- default plot path is now
previous path / plots
, which is a non-existent directory. - this directory will be created when user confirms to proceed to plotting in the
SetupPlot
page. - However, because this directory not exist whilst the user is on the
SetupPlot
, when user clicks thefolder
icon, and thencancel
the dialog box back again, the backend functionget_disk_stats
from theutils.rs
gets triggered. And crashes the application - the reason is,
get_disk_stats
is taking a directory as its parameter, and when this directory is non-existent, it crashes, naturally.
We have to call get_disk_stats
after the cancel
action, since the user may have selected another disk. So it's not an option to: not call get_disk_stats
after cancel
.
My suggestion would be (for the 2nd item): immediately create the |
Another suggestion would be, if plot directory does not exist yet, and we don't want to create it without prompting the user. Then, we can supply the But this approach would require extra |
Thanks @natachadelarosa ! There are 2 small issues left imo: 2- And when the folder icon is clicked, we are getting the last error on the console @isSerge did a great job cleaning all the red entries on the console, keeping it clean as it is may be a good idea :) |
src/pages/SetupPlot.vue
Outdated
@@ -230,6 +230,7 @@ export default defineComponent({ | |||
await this.updateDriveStats(); | |||
const path = (await tauri.path.dataDir()) + util.appName + util.PLOT_FOLDER; | |||
this.store.setPlotPath(path); | |||
this.createDefaultPlotDir(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await
?
other than that, this looks great to me, I don't have any more suggestions :)
No description provided.