Fix Editor file picker paths
Normalize File Browser picker paths before opening Editor sessions so container paths are not resolved as /a0/a0/.
Alessandro committed
Jul 16, 2026 at 15:02 UTC
4a80d26e3c93ff6d88ebe2eeedaae0b8953c1079
2 files changed
+2
-1
plugins/_editor/webui/editor-store.js
+1
-1
@@ -911,7 +911,7 @@ const model = {
911
const files = selectedFiles.filter((file) => file?.path);
912
if (!files.length) return false;
913
for (const file of files) {
914
- const session = await this.openPath(file.path, { source: "file-browser", refresh: true });
914
+ const session = await this.openPath(fileBrowserStore.normalizePath(file.path), { source: "file-browser", refresh: true });
915
if (!session || session.ok === false) {
916
throw new Error(this.error || `Could not open ${file.name || file.path}`);
917
}
tests/test_office_canvas_setup.py
+1
@@ -553,6 +553,7 @@ def test_editor_open_file_browser_prefers_context_home_before_workdir_fallback()
553
assert "workdirPath = response?.settings?.workdir_path || workdirPath;" in open_file_browser
554
assert "fileBrowserStore.openTextPicker" in open_file_browser
555
assert "selectedFiles" in open_file_browser
556
+ assert "fileBrowserStore.normalizePath(file.path)" in open_file_browser
557
558
559
def test_editor_toolbar_places_preview_toggle_left_and_save_on_right():