public async Task <IActionResult> Delete(ServerPathRequest request) { string name = request.Name; string path = request.Path; IRemoteFolder folder = await _remoteService.GetFolder(name, path); if (folder == null) { request.Path = null; return(RedirectToServer(request)); } await _remoteService.DeleteFolder(name, path); request.Path = folder.Parent?.Path; return(RedirectToServer(request)); }