{"action":"created","issue":{"url":"https://api.github.com/repos/atom/electron/issues/2987","labels_url":"https://api.github.com/repos/atom/electron/issues/2987/labels{/name}","comments_url":"https://api.github.com/repos/atom/electron/issues/2987/comments","events_url":"https://api.github.com/repos/atom/electron/issues/2987/events","html_url":"https://github.com/atom/electron/issues/2987","id":109755841,"number":2987,"title":"session.setDownloadPath broken","user":{"login":"MichaelOstermann","id":7288490,"avatar_url":"https://avatars.githubusercontent.com/u/7288490?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelOstermann","html_url":"https://github.com/MichaelOstermann","followers_url":"https://api.github.com/users/MichaelOstermann/followers","following_url":"https://api.github.com/users/MichaelOstermann/following{/other_user}","gists_url":"https://api.github.com/users/MichaelOstermann/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelOstermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelOstermann/subscriptions","organizations_url":"https://api.github.com/users/MichaelOstermann/orgs","repos_url":"https://api.github.com/users/MichaelOstermann/repos","events_url":"https://api.github.com/users/MichaelOstermann/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelOstermann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/electron/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-05T09:02:33Z","updated_at":"2015-10-06T02:01:26Z","closed_at":null,"body":"Currently `BrowserWindow.webContents.session.setDownloadPath` does nothing.\r\n\r\nindex.html\r\n\r\n```html\r\n<html>\r\n<head></head>\r\n<body>\r\n    <a href=\"https://www.google.at/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png\" download>Test</a>\r\n</body>\r\n</html>\r\n```\r\n\r\nmain.js\r\n\r\n```javascript\r\nvar app = require('app');\r\nvar BrowserWindow = require('browser-window');\r\n\r\napp.on('ready', function() {\r\n  mainWindow = new BrowserWindow({\r\n    width: 800,\r\n    height: 600\r\n  });\r\n  mainWindow.webContents.session.setDownloadPath(\r\n      app.getPath('home')\r\n  );\r\n  mainWindow.loadUrl('file://' + __dirname + '/index.html');\r\n});\r\n```\r\n\r\nThe file dialog opens, but it is set to the default \"downloads\" folder.\r\n\r\nTested on OSX 10.10.2 with Electron v0.33.5"},"comment":{"url":"https://api.github.com/repos/atom/electron/issues/comments/145721917","html_url":"https://github.com/atom/electron/issues/2987#issuecomment-145721917","issue_url":"https://api.github.com/repos/atom/electron/issues/2987","id":145721917,"user":{"login":"hokein","id":2557445,"avatar_url":"https://avatars.githubusercontent.com/u/2557445?v=3","gravatar_id":"","url":"https://api.github.com/users/hokein","html_url":"https://github.com/hokein","followers_url":"https://api.github.com/users/hokein/followers","following_url":"https://api.github.com/users/hokein/following{/other_user}","gists_url":"https://api.github.com/users/hokein/gists{/gist_id}","starred_url":"https://api.github.com/users/hokein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hokein/subscriptions","organizations_url":"https://api.github.com/users/hokein/orgs","repos_url":"https://api.github.com/users/hokein/repos","events_url":"https://api.github.com/users/hokein/events{/privacy}","received_events_url":"https://api.github.com/users/hokein/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T02:01:26Z","updated_at":"2015-10-06T02:01:26Z","body":"I believe this is a regression issue, it works on v0.30.X and v0.31.X(#2855).\r\n\r\n@etiktin Thanks for the detailed investigation on it!\r\nThe result is a little surprising. After a closer look, it is caused by calling a virtual function in a class's constructor. In a constructor, the virtual call mechanism is disabled because the derived class is created only after the parent class is constructed. \r\n"}}