{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/1658","labels_url":"https://api.github.com/repos/atom/electron/issues/1658/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/1658/comments","events_url":"https://api.github.com/repos/atom/electron/issues/1658/events","html_url":"https://github.com/atom/electron/issues/1658","id":75540736,"number":1658,"title":"fs - reading asar files fails","user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-12T09:43:41Z","updated_at":"2015-05-13T05:25:11Z","closed_at":null,"body":"I find electrons patching of fs functions a bit harsh. If you have code that fs.readFileSync() and you accidentaly read a foo.asar file that is just a text file renamed to foo.asar, you get an error \"Invalid Package\".\r\n\r\nFor Atom that uses asar this might make sense, but please make this configurable in Electron for clients that do not leverage asar."},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/101516672","html_url":"https://github.com/atom/electron/issues/1658#issuecomment-101516672","issue_url":"https://api.github.com/repos/atom/electron/issues/1658","id":101516672,"user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T05:25:11Z","updated_at":"2015-05-13T05:25:11Z","body":"Oh yeah, don't get me wrong, I like if things just work without custom\nmodules! But then don't throw a very weird non-node error when\nfs.readFile() or fs.stat() a text file that happens to have a asar\nextension.\n\nIf you overwrite a module, play by the rules of the module and don't break\nits contract.\nAm 13.05.2015 1:57 vorm. schrieb \"Paul Betts\" <notifications@github.com>:\n\n> That is quite insane, it should be the other way around. A client can opt\n> in to asar support with a method call and then things just work.\n>\n> What you're describing is the *opposite* of \"things just work\", it means\n> that every library that uses Electron now has to be ASAR aware (including\n> ones that were not designed for Electron)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/atom/electron/issues/1658#issuecomment-101462942>.\n>\n"}}