{"action":"created","issue":{"url":"https://api.github.com/repos/nwjs/nw-builder/issues/350","repository_url":"https://api.github.com/repos/nwjs/nw-builder","labels_url":"https://api.github.com/repos/nwjs/nw-builder/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw-builder/issues/350/comments","events_url":"https://api.github.com/repos/nwjs/nw-builder/issues/350/events","html_url":"https://github.com/nwjs/nw-builder/issues/350","id":167979202,"number":350,"title":"Downloads are not cached","user":{"login":"kessler","id":147367,"avatar_url":"https://avatars.githubusercontent.com/u/147367?v=3","gravatar_id":"","url":"https://api.github.com/users/kessler","html_url":"https://github.com/kessler","followers_url":"https://api.github.com/users/kessler/followers","following_url":"https://api.github.com/users/kessler/following{/other_user}","gists_url":"https://api.github.com/users/kessler/gists{/gist_id}","starred_url":"https://api.github.com/users/kessler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kessler/subscriptions","organizations_url":"https://api.github.com/users/kessler/orgs","repos_url":"https://api.github.com/users/kessler/repos","events_url":"https://api.github.com/users/kessler/events{/privacy}","received_events_url":"https://api.github.com/users/kessler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nwjs/nw-builder/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-27T23:20:48Z","updated_at":"2016-07-30T18:34:28Z","closed_at":null,"body":"On my system (OSX, nwjs 0.12.3, nw-builder 2.2.5), nwjs downloads are not cached.\r\n\r\nI traced the problem to this code section:\r\n```javascript\r\n// if the version is >=0.12.3, then we don't which files we want from the archives, so just check that the folder\r\n// exists and has at least 4 files in it.\r\nif(files.length === 1 && files[0] === '*'){\r\n    return fs.existsSync(cachepath) && fs.readdirSync(cachepath).length > 3;\r\n}\r\n```\r\nhttps://github.com/nwjs/nw-builder/blob/master/lib/downloader.js#L27\r\n\r\nOn my machine ```fs.readdirSync(cachepath).length``` equals exactly 3, if I change ```>``` to ```>=``` everything works. Any ideas as to why this is happening?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nwjs/nw-builder/issues/comments/236381794","html_url":"https://github.com/nwjs/nw-builder/issues/350#issuecomment-236381794","issue_url":"https://api.github.com/repos/nwjs/nw-builder/issues/350","id":236381794,"user":{"login":"kessler","id":147367,"avatar_url":"https://avatars.githubusercontent.com/u/147367?v=3","gravatar_id":"","url":"https://api.github.com/users/kessler","html_url":"https://github.com/kessler","followers_url":"https://api.github.com/users/kessler/followers","following_url":"https://api.github.com/users/kessler/following{/other_user}","gists_url":"https://api.github.com/users/kessler/gists{/gist_id}","starred_url":"https://api.github.com/users/kessler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kessler/subscriptions","organizations_url":"https://api.github.com/users/kessler/orgs","repos_url":"https://api.github.com/users/kessler/repos","events_url":"https://api.github.com/users/kessler/events{/privacy}","received_events_url":"https://api.github.com/users/kessler/received_events","type":"User","site_admin":false},"created_at":"2016-07-30T18:34:28Z","updated_at":"2016-07-30T18:34:28Z","body":"It's osx and PR is on the way"}}
{"actor":{"display_login":"kessler"}}