{"action":"created","issue":{"url":"https://api.github.com/repos/getpelican/pelican/issues/1489","labels_url":"https://api.github.com/repos/getpelican/pelican/issues/1489/labels{/name}","comments_url":"https://api.github.com/repos/getpelican/pelican/issues/1489/comments","events_url":"https://api.github.com/repos/getpelican/pelican/issues/1489/events","html_url":"https://github.com/getpelican/pelican/pull/1489","id":44798023,"number":1489,"title":"Fix using {filename} on Windows","user":{"login":"bugnano","id":299634,"avatar_url":"https://avatars.githubusercontent.com/u/299634?v=3","gravatar_id":"","url":"https://api.github.com/users/bugnano","html_url":"https://github.com/bugnano","followers_url":"https://api.github.com/users/bugnano/followers","following_url":"https://api.github.com/users/bugnano/following{/other_user}","gists_url":"https://api.github.com/users/bugnano/gists{/gist_id}","starred_url":"https://api.github.com/users/bugnano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugnano/subscriptions","organizations_url":"https://api.github.com/users/bugnano/orgs","repos_url":"https://api.github.com/users/bugnano/repos","events_url":"https://api.github.com/users/bugnano/events{/privacy}","received_events_url":"https://api.github.com/users/bugnano/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-03T12:22:41Z","updated_at":"2015-01-02T09:13:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/getpelican/pelican/pulls/1489","html_url":"https://github.com/getpelican/pelican/pull/1489","diff_url":"https://github.com/getpelican/pelican/pull/1489.diff","patch_url":"https://github.com/getpelican/pelican/pull/1489.patch"},"body":"Python on Windows uses the '\\\\' character for paths on os.path functions, while on source files usually the '/' character is used to separate paths.\r\n\r\nself._context['filenames'] has the file names separated by '\\\\' on Windows, so if a source file references a file with\r\n\r\n```\r\n{filename}/dir1/dir2/referenced_file.rst\r\n```\r\n\r\nthis would fail, as self._context['filenames'] has this file mapped to `dir1\\dir2\\referenced_file.rst`\r\n\r\nThis patch solves the problem in an os-portable way, that is it separates the source path '/' characters, and it replaces them with the correct os-dependent path separator, so it works both on Windows and on Linux."},"comment":{"url":"https://api.github.com/repos/getpelican/pelican/issues/comments/68515034","html_url":"https://github.com/getpelican/pelican/pull/1489#issuecomment-68515034","issue_url":"https://api.github.com/repos/getpelican/pelican/issues/1489","id":68515034,"user":{"login":"smartass101","id":941907,"avatar_url":"https://avatars.githubusercontent.com/u/941907?v=3","gravatar_id":"","url":"https://api.github.com/users/smartass101","html_url":"https://github.com/smartass101","followers_url":"https://api.github.com/users/smartass101/followers","following_url":"https://api.github.com/users/smartass101/following{/other_user}","gists_url":"https://api.github.com/users/smartass101/gists{/gist_id}","starred_url":"https://api.github.com/users/smartass101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smartass101/subscriptions","organizations_url":"https://api.github.com/users/smartass101/orgs","repos_url":"https://api.github.com/users/smartass101/repos","events_url":"https://api.github.com/users/smartass101/events{/privacy}","received_events_url":"https://api.github.com/users/smartass101/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T09:13:10Z","updated_at":"2015-01-02T09:13:10Z","body":"Your solution looks quite sane. So you've made sure that it works on all the supported platforms? I suppose the test suite covers this already, or are new tests required?"}}