Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Errors in the file manager when there are spaces in the path

Errors in the file manager when there are spaces in the path

Scheduled Pinned Locked Moved Solved Support
3 Posts 2 Posters 562 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mehdiM Offline
      mehdiM Offline
      mehdi
      App Dev
      wrote on last edited by
      #1

      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)

      nebulonN 1 Reply Last reply
      0
      • mehdiM mehdi

        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)

        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        @mehdi good catch. I can confirm and reproduce this. Working on a fix.

        1 Reply Last reply
        1
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #3

          This is fixed with https://git.cloudron.io/cloudron/dashboard/-/commit/99f096c9711528406144e0245f8020c502d6490a and will be part of 6.2 then

          1 Reply Last reply
          1
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search