Skip to content

Commit bbdfb85

Browse files
committed
chore: alert if app data directory canot be found as boot will fail
1 parent d03ad05 commit bbdfb85

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,18 @@
208208
// some linux distros may not have Documents folder. so we use the home folder
209209
// https://github.com/phcode-dev/phoenix/issues/1729
210210
window._tauriBootVars.documentDir = results[4].value;
211-
} else {
212-
console.error("unable to determine user documents dir, defaulting to app data dir documentdir:",
211+
} else if(results[2].status === "fulfilled"){
212+
console.error("Unable to determine user documents dir, defaulting to app data dir as document dir:",
213213
results[1].reason, "home folder error: ", results[4].reason);
214214
window._tauriBootVars.documentDir = results[2].value;
215+
} else {
216+
alert("Could not resolve user documents directory. \nPhoenix Code cannot start.");
217+
}
218+
219+
if(results[2].status === "fulfilled") {
220+
window._tauriBootVars.appLocalDir = results[2].value;
221+
} else {
222+
alert("Could not resolve Application Data directory. \nPhoenix Code cannot start.");
215223
}
216224

217225
// For tests, documents dir is localAppDataDir/testDocuments to keep user documents garbage free for tests

src/main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ function confirmReload(title, message) {
214214
});
215215
copyButton.textContent = 'Copy Error';
216216
getHelpButton.textContent = 'Get Help';
217-
reloadButton.textContent = 'Reload Page';
218-
217+
reloadButton.textContent = 'Restart App';
219218
// Styling for visibility
220219
// Define common styles for buttons
221220
const buttonStyles = {

0 commit comments

Comments
 (0)