Commit 70cbc033 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Fixed bug in the filesystem API when creating for the first time the user base path fodler.

parent d10d8d4d
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -516,10 +516,14 @@ class FileManagerAPI(PrivateGETAPI, PrivatePOSTAPI):
            
            
            # Did we just get a "cannot stat - No such file or directory error?
            # Did we just get a "cannot stat - No such file or directory error?
            if 'No such file or directory' in out.stderr:
            if 'No such file or directory' in out.stderr:
                
                # Create the folder if this was the root for the user (storage base path)
                if path == '/':
                if path == '/':
                    self.mkdir(self.sanitize_and_prepare_shell_path('/', storage, user), user, storage, force=True)
                    self.mkdir(self.sanitize_and_prepare_shell_path('/', storage, user), user, storage, force=True)
                else:
                
                # Return (empty) data
                return data
                return data
            
            else:
            else:
                raise Exception(out.stderr)
                raise Exception(out.stderr)