{"action":"created","issue":{"url":"https://api.github.com/repos/racket/racket/issues/1292","repository_url":"https://api.github.com/repos/racket/racket","labels_url":"https://api.github.com/repos/racket/racket/issues/1292/labels{/name}","comments_url":"https://api.github.com/repos/racket/racket/issues/1292/comments","events_url":"https://api.github.com/repos/racket/racket/issues/1292/events","html_url":"https://github.com/racket/racket/issues/1292","id":144482562,"number":1292,"title":"path-add-suffix doesn't implement the same behavior as its documentation says","user":{"login":"endobson","id":170008,"avatar_url":"https://avatars.githubusercontent.com/u/170008?v=3","gravatar_id":"","url":"https://api.github.com/users/endobson","html_url":"https://github.com/endobson","followers_url":"https://api.github.com/users/endobson/followers","following_url":"https://api.github.com/users/endobson/following{/other_user}","gists_url":"https://api.github.com/users/endobson/gists{/gist_id}","starred_url":"https://api.github.com/users/endobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endobson/subscriptions","organizations_url":"https://api.github.com/users/endobson/orgs","repos_url":"https://api.github.com/users/endobson/repos","events_url":"https://api.github.com/users/endobson/events{/privacy}","received_events_url":"https://api.github.com/users/endobson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-30T07:04:57Z","updated_at":"2016-04-16T21:57:20Z","closed_at":"2016-04-16T17:09:04Z","body":"http://docs.racket-lang.org/reference/Manipulating_Paths.html?q=rename-ext#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-add-suffix%29%29\r\n\r\nSimilar to path-replace-suffix, but any existing suffix on path is preserved by replacing every . in the last path element with _, and then the suffix is added to the end.\r\n\r\n```\r\n-> (path-add-suffix \"foo.bar.baz\" \".z\")\r\n#<path:foo.bar_baz.z>\r\n```\r\n\r\nI expect this to return `#<path:foo_bar_baz.z>` because the `.` between foo and bar is in the last path element."},"comment":{"url":"https://api.github.com/repos/racket/racket/issues/comments/210912429","html_url":"https://github.com/racket/racket/issues/1292#issuecomment-210912429","issue_url":"https://api.github.com/repos/racket/racket/issues/1292","id":210912429,"user":{"login":"mflatt","id":295034,"avatar_url":"https://avatars.githubusercontent.com/u/295034?v=3","gravatar_id":"","url":"https://api.github.com/users/mflatt","html_url":"https://github.com/mflatt","followers_url":"https://api.github.com/users/mflatt/followers","following_url":"https://api.github.com/users/mflatt/following{/other_user}","gists_url":"https://api.github.com/users/mflatt/gists{/gist_id}","starred_url":"https://api.github.com/users/mflatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mflatt/subscriptions","organizations_url":"https://api.github.com/users/mflatt/orgs","repos_url":"https://api.github.com/users/mflatt/repos","events_url":"https://api.github.com/users/mflatt/events{/privacy}","received_events_url":"https://api.github.com/users/mflatt/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T21:57:20Z","updated_at":"2016-04-16T21:57:20Z","body":"After thinking about this more, I remember why the newly documented behavior was the implemented one. The idea is that `path-add-suffix` should avoid mapping differently names files to a same-named file. If all \".\"s were replaced with \"_\", then adding \".fail\" to \"a.tar.gz\" and \"a_tar.gz\" would produce \"a_tar_gz.fail\" in both cases. So, I think `path-add-extension` should stick with the old behavior, after all (but not count a leading \".\" as an extension separator)."}}