{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/1590","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/1590/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/1590/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/1590/events","html_url":"https://github.com/syncthing/syncthing/pull/1590","id":66481480,"number":1590,"title":"Handle long filenames on Windows (fixes #1295)","user":{"login":"calmh","id":125426,"avatar_url":"https://avatars.githubusercontent.com/u/125426?v=3","gravatar_id":"","url":"https://api.github.com/users/calmh","html_url":"https://github.com/calmh","followers_url":"https://api.github.com/users/calmh/followers","following_url":"https://api.github.com/users/calmh/following{/other_user}","gists_url":"https://api.github.com/users/calmh/gists{/gist_id}","starred_url":"https://api.github.com/users/calmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calmh/subscriptions","organizations_url":"https://api.github.com/users/calmh/orgs","repos_url":"https://api.github.com/users/calmh/repos","events_url":"https://api.github.com/users/calmh/events{/privacy}","received_events_url":"https://api.github.com/users/calmh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syncthing/syncthing/labels/pr-enhancement","name":"pr-enhancement","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-05T21:01:12Z","updated_at":"2015-04-07T21:44:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing/pulls/1590","html_url":"https://github.com/syncthing/syncthing/pull/1590","diff_url":"https://github.com/syncthing/syncthing/pull/1590.diff","patch_url":"https://github.com/syncthing/syncthing/pull/1590.patch"},"body":"There are many approaches to this... This one works on the assumption that it's safest for most of the code if the change is done as early as possible, i.e. at config loading time, lest we forget some critical  place where a conversion might need to be done. And it also assumes that we should not put the `\\\\?\\` in the config or show it to the user in the GUI, as they may be scared and confused by it. If we think most Windows users are fine with `\\\\?\\` being visible then we can just add it at config loading and not do the dance with RawPath/Path...\r\n\r\nI've tested that this starts on Windows and seems to hash files while mentioning paths starting with `\\\\?\\` in the debug output... Some more Windows testing would be nice.\r\n"},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/90740869","html_url":"https://github.com/syncthing/syncthing/pull/1590#issuecomment-90740869","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/1590","id":90740869,"user":{"login":"AudriusButkevicius","id":1144861,"avatar_url":"https://avatars.githubusercontent.com/u/1144861?v=3","gravatar_id":"","url":"https://api.github.com/users/AudriusButkevicius","html_url":"https://github.com/AudriusButkevicius","followers_url":"https://api.github.com/users/AudriusButkevicius/followers","following_url":"https://api.github.com/users/AudriusButkevicius/following{/other_user}","gists_url":"https://api.github.com/users/AudriusButkevicius/gists{/gist_id}","starred_url":"https://api.github.com/users/AudriusButkevicius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AudriusButkevicius/subscriptions","organizations_url":"https://api.github.com/users/AudriusButkevicius/orgs","repos_url":"https://api.github.com/users/AudriusButkevicius/repos","events_url":"https://api.github.com/users/AudriusButkevicius/events{/privacy}","received_events_url":"https://api.github.com/users/AudriusButkevicius/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T21:44:46Z","updated_at":"2015-04-07T21:44:46Z","body":"So after adding a new folder, all the paths suddenly get unset.\r\nPerhaps we should have a folder.Prepare() and call that in config.Folders() as we are building the map.\r\n\r\nAlso, perhaps (atleast on windows) we should expand all paths to be absolute, and always apply the magic prefix?"}}