Skip to content

Commit be388cd

Browse files
authored
Merge pull request #129 from silx-kit/patch-rtc
Patch HDF5 file paths in case of RTC
2 parents 5fc5e84 + f217069 commit be388cd

File tree

2 files changed

+7580
-5822
lines changed

2 files changed

+7580
-5822
lines changed

src/browser.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ export function activateOpenInBrowser(
5151
execute: () => {
5252
const file = browser.selectedItems().next();
5353

54-
const content = new H5webWidget(file.value.path);
54+
// https://github.com/silx-kit/jupyterlab-h5web/issues/121
55+
const rawPath = file.value.path as string;
56+
const path = rawPath.startsWith('RTC:')
57+
? rawPath.slice(4, rawPath.length)
58+
: rawPath;
59+
60+
const content = new H5webWidget(path);
5561
const widget = new MainAreaWidget<H5webWidget>({ content });
5662
widget.title.label = file.value.name;
5763
app.shell.add(widget, 'main');

0 commit comments

Comments
 (0)