diff --git a/app/agent/components/host-browser/host-browser-controller.js b/app/agent/components/host-browser/host-browser-controller.js index 09e47eaa9..380294845 100644 --- a/app/agent/components/host-browser/host-browser-controller.js +++ b/app/agent/components/host-browser/host-browser-controller.js @@ -60,7 +60,7 @@ angular.module('portainer.agent').controller('HostBrowserController', [ } function downloadFile(file) { - var filePath = ctrl.isRoot() ? file : this.state.path + '/' + file; + var filePath = buildPath(ctrl.state.path, file); HostBrowserService.get(filePath) .then(function onFileReceived(data) { var downloadData = new Blob([data.file], {