Commit 55e0ca9
committed
Handle write-protected disks when modifying settings and shortcuts
Ensure DeskTop can run nicely when running from write protected media.
This involves updating the code that saves settings/shortcuts to do a
better job of distinguishing failure cases, and also modoifying the
ProDOS MLI call flow. Now everything follows this pattern:
1. CREATE the LOCAL/ directory (if it already exists, no-op)
2. DESTROY the settings file (if it doesn't exist, no-op); this is to
detect write protection early. Without this, OPEN/WRITE/CLOSE can fail
to flush on CLOSE and leave the system in a bad state.
3. CREATE/OPEN/WRITE/CLOSE the settings file.
... and if running from RAMCard, then temporarily swap the ProDOS
Prefix and repeat the above steps for the startup path.
At any failure point this fails then initially a prompt is shown to
confirm that the user even wants to save settings. If they continue
then any subsequent failure is either OK or Try Again/Cancel.
This applies to the Control Panels that modify settings as well as
DeskTop's shortcut modification code.1 parent f3bc42c commit 55e0ca9
13 files changed
Lines changed: 626 additions & 257 deletions
File tree
- bin
- src
- desk_acc
- desktop
- lib
- tests
- desk_acc
- desktop
- launcher
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| |||
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | | - | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
| 139 | + | |
128 | 140 | | |
129 | 141 | | |
130 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
1308 | 1318 | | |
1309 | 1319 | | |
1310 | 1320 | | |
1311 | 1321 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | 1322 | | |
| 1323 | + | |
1316 | 1324 | | |
1317 | 1325 | | |
1318 | 1326 | | |
| |||
1324 | 1332 | | |
1325 | 1333 | | |
1326 | 1334 | | |
1327 | | - | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1328 | 1344 | | |
1329 | 1345 | | |
1330 | 1346 | | |
1331 | 1347 | | |
1332 | 1348 | | |
1333 | 1349 | | |
1334 | 1350 | | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
1338 | 1354 | | |
1339 | 1355 | | |
1340 | 1356 | | |
1341 | 1357 | | |
1342 | 1358 | | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1343 | 1362 | | |
1344 | | - | |
1345 | | - | |
1346 | 1363 | | |
1347 | 1364 | | |
1348 | 1365 | | |
1349 | 1366 | | |
1350 | 1367 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
1356 | 1379 | | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1357 | 1383 | | |
1358 | 1384 | | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
| 1385 | + | |
1376 | 1386 | | |
1377 | 1387 | | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
| 1388 | + | |
1382 | 1389 | | |
1383 | | - | |
| 1390 | + | |
1384 | 1391 | | |
1385 | 1392 | | |
1386 | 1393 | | |
1387 | 1394 | | |
1388 | | - | |
1389 | 1395 | | |
1390 | | - | |
| 1396 | + | |
1391 | 1397 | | |
1392 | | - | |
| 1398 | + | |
1393 | 1399 | | |
| 1400 | + | |
1394 | 1401 | | |
1395 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
1396 | 1414 | | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
1402 | 1426 | | |
1403 | | - | |
1404 | | - | |
1405 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1406 | 1436 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1437 | + | |
1410 | 1438 | | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
1415 | 1439 | | |
1416 | 1440 | | |
1417 | 1441 | | |
| |||
0 commit comments