{"action":"opened","issue":{"url":"https://api.github.com/repos/grow/grow/issues/349","repository_url":"https://api.github.com/repos/grow/grow","labels_url":"https://api.github.com/repos/grow/grow/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/grow/grow/issues/349/comments","events_url":"https://api.github.com/repos/grow/grow/issues/349/events","html_url":"https://github.com/grow/grow/issues/349","id":197700340,"number":349,"title":"grow doesn't find content collections on Windows","user":{"login":"vitorio","id":336712,"avatar_url":"https://avatars.githubusercontent.com/u/336712?v=3","gravatar_id":"","url":"https://api.github.com/users/vitorio","html_url":"https://github.com/vitorio","followers_url":"https://api.github.com/users/vitorio/followers","following_url":"https://api.github.com/users/vitorio/following{/other_user}","gists_url":"https://api.github.com/users/vitorio/gists{/gist_id}","starred_url":"https://api.github.com/users/vitorio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitorio/subscriptions","organizations_url":"https://api.github.com/users/vitorio/orgs","repos_url":"https://api.github.com/users/vitorio/repos","events_url":"https://api.github.com/users/vitorio/events{/privacy}","received_events_url":"https://api.github.com/users/vitorio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-27T13:04:46Z","updated_at":"2016-12-27T13:04:46Z","closed_at":null,"body":"Seems like a different issue from #329 after all.\r\n\r\n`grow run` launches for me on Windows 10 (native Python and git) but doesn't find any of my content collections, and doesn't report any errors.  `grow routes` only shows my Static routes, no collections or content.\r\n\r\nI can make grow find the Collections initially by adding in the Windows path separator to `_normalize_path()` in `pods.py` around line 133:\r\n\r\n```python\r\n        return os.path.join(self.root, pod_path.lstrip('/\\\\'))\r\n```\r\n\r\n(Using `os.path.sep` doesn't seem to work.)\r\n\r\nBut, the resulting collections don't seem to be correct.  On Windows, `pods.py` function `get_collection()` reports:\r\n\r\n```\r\ncollection.Collection.CONTENT_PATH /content\r\ncollection_path \\content/posts\r\npod_path \\content/posts\r\n<Collection \"\\content/posts\">\r\n```\r\n\r\nBut on POSIX:\r\n\r\n```\r\ncollection.Collection.CONTENT_PATH /content\r\ncollection_path /content/posts\r\npod_path /content/posts\r\n<Collection \"posts\">\r\n```\r\n\r\nFurther stripping out the Windows path separator in `collection.py` function `list_docs()` around line 247 seems to do the trick:\r\n\r\n```python\r\n            pod_path = os.path.join(self.pod_path, path.lstrip('/\\\\'))\r\n```\r\n\r\nStatic files still seem to be causing trouble, haven't dug into that yet."}}
{"actor":{"display_login":"vitorio"}}