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

Cannot connect file share,cannot recognize non-ascii path #4428

Closed
wangzyon opened this issue Mar 7, 2022 · 5 comments · Fixed by #4947
Closed

Cannot connect file share,cannot recognize non-ascii path #4428

wangzyon opened this issue Mar 7, 2022 · 5 comments · Fixed by #4947
Labels
bug Something isn't working

Comments

@wangzyon
Copy link

wangzyon commented Mar 7, 2022

develop branch
version 3c8922e

image

@bsekachev
Copy link
Member

Thank you for report, need to check

@bsekachev bsekachev added the bug Something isn't working label Sep 6, 2022
rhee-elten added a commit to rhee-elten/cvat that referenced this issue Sep 13, 2022
@rhee-elten
Copy link
Contributor

rhee-elten commented Sep 13, 2022

I encountered the same problem, and found a possible fix.
To test the idea, the fix is applied onto a new fork of this project ( 3bd7300 )
Please check this fix works and has no other problems. Thank you.

diff --git a/cvat-core/src/server-proxy.ts b/cvat-core/src/server-proxy.ts
index bcc7e3ad..0dd22d4d 100644
--- a/cvat-core/src/server-proxy.ts
+++ b/cvat-core/src/server-proxy.ts
@@ -217,13 +217,12 @@
 
             async function share(directoryArg) {
                 const { backendAPI } = config;
-                const directory = encodeURI(directoryArg);
 
                 let response = null;
                 try {
                     response = await Axios.get(`${backendAPI}/server/share`, {
                         proxy: config.proxy,
-                        params: { directory },
+                        params: { directory: directoryArg },
                     });
                 } catch (errorData) {
                     throw generateError(errorData);

@nmanovic
Copy link
Contributor

@rhee-elten , could you please send us a PR?

@rhee-elten
Copy link
Contributor

rhee-elten commented Sep 13, 2022

@nmanovic, I just sent a PR #4938 for above fix.

@rhee-elten
Copy link
Contributor

rhee-elten commented Sep 14, 2022

@nmanovic , i just closed PR #4938 and re-sent an equivalent PR #4946 over 1db247a because previous #4938 conflicts with update HEAD and could not be resolved automatically.

Update: fixed a typo, revoked #4946, and re-sent #4947.

rhee-elten added a commit to rhee-elten/cvat that referenced this issue Sep 14, 2022
…non-ascii path (Issue cvat-ai#4428 Cannot connect file share,cannot recognize non-ascii path)
bsekachev added a commit that referenced this issue Sep 15, 2022
* FIX: Remove possibly duplicated encodeURI() to prevent double encode non-ascii path (Issue #4428 Cannot connect file share,cannot recognize non-ascii path)

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Boris Sekachev <sekachev.bs@gmail.com>
@nmanovic nmanovic mentioned this issue Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants