Errors in the file manager when there are spaces in the path
-
I have errors in the file manager when trying to rename or move a file. I believe it happens when there are spaces in the full path. It seems that there's a mistake somewhere with the URL-encoding of the file paths, and the server responds with a 500 error.
In my case, it's for a Volume, but I guess it would be the same in the file manager of a normal app data.
Request:
PUT https://my.cloudron.url/api/v1/volumes/VOLUME_ID/files/directory%20with%20spaces/file.ext {"action":"rename","newFilePath":"directory%20with%20spaces/new subdirectory with spaces/filename.ext"}Response :
500 { errno: -2, code: "ENOENT", syscall: "rename", path: "/app/data/VOLUME_ID/directory with spaces/filename.ext", dest: "/app/data/VOLUME_ID/directory%20with%20spaces/new subdirectory with spaces/filename.ext" }I notice weird stuff with the spaces in the path. In the original path, it seems all spaces are actually spaces. But in the destination, up to the current directory it's with
%20s, but the directory to which I'm trying to drag & drop my file correctly has spaces.(I have tried to anonymize some stuff in my logs, so I may have made mistakes, but I tried to keep it coherent with what I saw)
-
I have errors in the file manager when trying to rename or move a file. I believe it happens when there are spaces in the full path. It seems that there's a mistake somewhere with the URL-encoding of the file paths, and the server responds with a 500 error.
In my case, it's for a Volume, but I guess it would be the same in the file manager of a normal app data.
Request:
PUT https://my.cloudron.url/api/v1/volumes/VOLUME_ID/files/directory%20with%20spaces/file.ext {"action":"rename","newFilePath":"directory%20with%20spaces/new subdirectory with spaces/filename.ext"}Response :
500 { errno: -2, code: "ENOENT", syscall: "rename", path: "/app/data/VOLUME_ID/directory with spaces/filename.ext", dest: "/app/data/VOLUME_ID/directory%20with%20spaces/new subdirectory with spaces/filename.ext" }I notice weird stuff with the spaces in the path. In the original path, it seems all spaces are actually spaces. But in the destination, up to the current directory it's with
%20s, but the directory to which I'm trying to drag & drop my file correctly has spaces.(I have tried to anonymize some stuff in my logs, so I may have made mistakes, but I tried to keep it coherent with what I saw)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login