{"action":"created","issue":{"url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/64","repository_url":"https://api.github.com/repos/simonh1000/ftp-deploy","labels_url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/64/comments","events_url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/64/events","html_url":"https://github.com/simonh1000/ftp-deploy/issues/64","id":343304911,"node_id":"MDU6SXNzdWUzNDMzMDQ5MTE=","number":64,"title":"deleteRemote causes error when there are subdirectories at destination","user":{"login":"triemenschneider","id":3159548,"node_id":"MDQ6VXNlcjMxNTk1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/3159548?v=4","gravatar_id":"","url":"https://api.github.com/users/triemenschneider","html_url":"https://github.com/triemenschneider","followers_url":"https://api.github.com/users/triemenschneider/followers","following_url":"https://api.github.com/users/triemenschneider/following{/other_user}","gists_url":"https://api.github.com/users/triemenschneider/gists{/gist_id}","starred_url":"https://api.github.com/users/triemenschneider/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triemenschneider/subscriptions","organizations_url":"https://api.github.com/users/triemenschneider/orgs","repos_url":"https://api.github.com/users/triemenschneider/repos","events_url":"https://api.github.com/users/triemenschneider/events{/privacy}","received_events_url":"https://api.github.com/users/triemenschneider/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-21T07:08:08Z","updated_at":"2018-07-25T22:44:54Z","closed_at":null,"author_association":"NONE","body":"If there are only files within the `/folder/` the deletion before upload works.\r\n**However if there is something like `/folder/subfolder` I get an error**😰:\r\n```\r\nError: /folder/subfolder: Is a directory\r\n```\r\n\r\nHere my upload-config:\r\n```\r\nremoteRoot: '/folder/',\r\n  include: ['*', '**/*'],\r\n  exclude: [],\r\n  deleteRemote: true\r\n```"},"comment":{"url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/comments/407920027","html_url":"https://github.com/simonh1000/ftp-deploy/issues/64#issuecomment-407920027","issue_url":"https://api.github.com/repos/simonh1000/ftp-deploy/issues/64","id":407920027,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzkyMDAyNw==","user":{"login":"Hexatan","id":2846341,"node_id":"MDQ6VXNlcjI4NDYzNDE=","avatar_url":"https://avatars2.githubusercontent.com/u/2846341?v=4","gravatar_id":"","url":"https://api.github.com/users/Hexatan","html_url":"https://github.com/Hexatan","followers_url":"https://api.github.com/users/Hexatan/followers","following_url":"https://api.github.com/users/Hexatan/following{/other_user}","gists_url":"https://api.github.com/users/Hexatan/gists{/gist_id}","starred_url":"https://api.github.com/users/Hexatan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hexatan/subscriptions","organizations_url":"https://api.github.com/users/Hexatan/orgs","repos_url":"https://api.github.com/users/Hexatan/repos","events_url":"https://api.github.com/users/Hexatan/events{/privacy}","received_events_url":"https://api.github.com/users/Hexatan/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T22:44:54Z","updated_at":"2018-07-25T22:44:54Z","author_association":"NONE","body":"I have the same error. Changing the `return deleteDir(ftp, dirName).then(() => ftp.delete(dirName));\r\n` into `return deleteDir(ftp, dirName).then(() => ftp.rmdir(dirName));` line 126 in lib.js seems to do the trick. I'm gonna try do more testing a do a pull request if there is no other bugs.\r\n"}}
{"actor":{"display_login":"Hexatan"}}