-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Optimise File-Explorer #1140
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
Optimise File-Explorer #1140
Changes from all commits
b4a4469
3c4606f
48f6b50
ee357b6
99395f7
be2341a
837490e
49e0da7
7deedba
7033c20
ed03204
59afc28
b71001e
1f7d1fa
b584142
383ac93
8dfeb65
3a1a03a
bf80ca9
9b9fa8c
cbd0233
d96f11c
7ef4483
3dfd5ef
9272951
0cfab43
c991d4a
e6a36a3
e638250
9fb30ce
3e0c62a
cb86b5d
90eb487
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ class WorkspaceFileProvider extends FileProvider { | |
| if (!this.workspace) this.createWorkspace() | ||
| path = path.replace(/^\/|\/$/g, '') // remove first and last slash | ||
| if (path.startsWith(this.workspacesPath + '/' + this.workspace)) return path | ||
| if (path.startsWith(this.workspace)) return this.workspacesPath + '/' + this.workspace | ||
| if (path.startsWith(this.workspace)) return path.replace(this.workspace, this.workspacesPath + '/' + this.workspace) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't understand this change, is this a fix for when a folder has the same name as the workspace?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes an issue i had when querying provider.exists(). If i have a path like |
||
| path = super.removePrefix(path) | ||
| let ret = this.workspacesPath + '/' + this.workspace + '/' + (path === '/' ? '' : path) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to add
asyncif the content of the function is not usingawait?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding async returns a promise. I added it because fileManager expects a promise just like how remixdProvider returns a promise.