Commit 1999d56
authored
fix(runtimed): handle directory paths in --attach without autosave spin loop (#1028)
* fix(runtimed): handle directory paths in --attach without autosave spin loop
When `--attach <directory>` passes a directory path, detect it early in
handle_open_notebook and delegate to handle_create_notebook with the
directory as working_dir. Also introduces a typed SaveError enum so the
autosave loop can distinguish unrecoverable errors (IsADirectory,
PermissionDenied) from transient ones and break instead of retrying forever.
Closes #1027
* fix(runtimed): use O_EXCL probe for directory writability check
Replace the fixed-name write probe with a UUID-named file created via
File::create_new (O_EXCL), so the writability check can never truncate
or remove an existing user file.1 parent 1fe0aa5 commit 1999d56
2 files changed
+82
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1107 | 1144 | | |
1108 | 1145 | | |
1109 | 1146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3772 | 3772 | | |
3773 | 3773 | | |
3774 | 3774 | | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
| 3791 | + | |
3775 | 3792 | | |
3776 | 3793 | | |
3777 | 3794 | | |
3778 | 3795 | | |
3779 | | - | |
| 3796 | + | |
3780 | 3797 | | |
3781 | 3798 | | |
3782 | 3799 | | |
| |||
3785 | 3802 | | |
3786 | 3803 | | |
3787 | 3804 | | |
3788 | | - | |
| 3805 | + | |
3789 | 3806 | | |
3790 | 3807 | | |
3791 | | - | |
| 3808 | + | |
3792 | 3809 | | |
3793 | 3810 | | |
3794 | 3811 | | |
| |||
3918 | 3935 | | |
3919 | 3936 | | |
3920 | 3937 | | |
3921 | | - | |
| 3938 | + | |
3922 | 3939 | | |
3923 | 3940 | | |
3924 | 3941 | | |
3925 | 3942 | | |
3926 | 3943 | | |
3927 | | - | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
3928 | 3953 | | |
3929 | 3954 | | |
3930 | 3955 | | |
| |||
4340 | 4365 | | |
4341 | 4366 | | |
4342 | 4367 | | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
4343 | 4375 | | |
4344 | 4376 | | |
4345 | 4377 | | |
| |||
6901 | 6933 | | |
6902 | 6934 | | |
6903 | 6935 | | |
6904 | | - | |
| 6936 | + | |
| 6937 | + | |
| 6938 | + | |
| 6939 | + | |
| 6940 | + | |
| 6941 | + | |
| 6942 | + | |
| 6943 | + | |
6905 | 6944 | | |
6906 | 6945 | | |
6907 | 6946 | | |
| |||
0 commit comments