Github user iilyak commented on the issue:

    https://github.com/apache/couchdb-couch/pull/198
  
    @davisp: I did fix `_replicator` part of a PR.
    > Isn't that obviously broken then? How would you ever match something with 
'/' in it to filename:basename(Anything)?
    
    basename is needed to extract last component of the path. The 
`couch_db:normalize_dbname` makes sure we strip `couch` extension, 
creation_time and whatnot.  
    ```
    couch_db:1616: dbname_suffix_test_ ("long/co$mplex-/path+/_something" -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ (<<"long/co$mplex-/path+/_something">> 
-> <<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
("shards/00000000-3fffffff/long/co$mplex-/path+/_something.1415960794" -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
(<<"shards/00000000-3fffffff/long/co$mplex-/path+/_something.1415960794">> -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
("shards/00000000-3fffffff/long/co$mplex-/path+/_something.1415960794.couch" -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
(<<"shards/00000000-3fffffff/long/co$mplex-/path+/_something.1415960794.couch">>
 -> <<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ ("_something" -> <<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ (<<"_something">> -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
("shards/00000000-3fffffff/_something.1415960794" -> <<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
(<<"shards/00000000-3fffffff/_something.1415960794">> -> <<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
("shards/00000000-3fffffff/_something.1415960794.couch" -> 
<<"_something">>)...ok
    couch_db:1616: dbname_suffix_test_ 
(<<"shards/00000000-3fffffff/_something.1415960794.couch">> -> 
<<"_something">>)...ok
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to