Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebrowser completely broken in master: can only open a dir if it is a direct child of the jlab root dir #8382

Closed
telamonian opened this issue May 7, 2020 · 0 comments · Fixed by #8383
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@telamonian
Copy link
Member

telamonian commented May 7, 2020

paths are relative to jlab root dir

Right now in the master branch, if I try to open a directory at eg git/jupyterlab, I get an error modal that says

Directory not found

Directory not found: 'git'

The error is due to the path getting screwed up somewhere and becoming git/git/jupyterlab instead of just git/jupyterlab. I believe the offending changes occurred in 46ec049 at these lines:

export function normalizePath(
contents: Contents.IManager,
root: string,
path: string
): string {
if (path === '/') {
return '';
}
const driveName = contents.driveName(root);
const localPath = contents.localPath(root);
let resolved = PathExt.normalize(PathExt.join(localPath, path));
return driveName ? `${driveName}:${resolved}` : resolved;
}

Previously it was instead:

export function normalizePath(
contents: Contents.IManager,
root: string,
path: string
): string {
const driveName = contents.driveName(root);
const localPath = contents.localPath(root);
const resolved = PathExt.resolve(localPath, path);
return driveName ? `${driveName}:${resolved}` : resolved;
}

Reverting the changes to normalizePath fixes the issue for me.

I'll open a PR with the reversion. Can someone please test this out and confirm both the issue and the solution?

paging @blink1073

telamonian added a commit to telamonian/jupyterlab that referenced this issue May 7, 2020
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Jun 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant