Skip to content

Commit

Permalink
Merge pull request #129 from silx-kit/patch-rtc
Browse files Browse the repository at this point in the history
Patch HDF5 file paths in case of RTC
  • Loading branch information
loichuder authored Jan 30, 2024
2 parents 5fc5e84 + f217069 commit be388cd
Show file tree
Hide file tree
Showing 2 changed files with 7,580 additions and 5,822 deletions.
8 changes: 7 additions & 1 deletion src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ export function activateOpenInBrowser(
execute: () => {
const file = browser.selectedItems().next();

const content = new H5webWidget(file.value.path);
// https://github.com/silx-kit/jupyterlab-h5web/issues/121
const rawPath = file.value.path as string;
const path = rawPath.startsWith('RTC:')
? rawPath.slice(4, rawPath.length)
: rawPath;

const content = new H5webWidget(path);
const widget = new MainAreaWidget<H5webWidget>({ content });
widget.title.label = file.value.name;
app.shell.add(widget, 'main');
Expand Down
Loading

0 comments on commit be388cd

Please sign in to comment.