Github user rnewson commented on a diff in the pull request:
https://github.com/apache/couchdb-couch/pull/115#discussion_r41382938
--- Diff: src/couch_server.erl ---
@@ -549,9 +554,13 @@ delete_db_file(RootDir, FullFilePath, Options) ->
end.
rename_on_delete(Original) ->
+ file:rename(Original, deleted_filename(Original)).
+
+deleted_filename(Original) ->
{{Y,Mon,D}, {H,Min,S}} = calendar:universal_time(),
+ UUID = ?b2l(couch_uuids:random()),
--- End diff --
I get what you intended but this seems awkward. Could delete_file instead
return `ok | {renamed, NewName} | {error, Reason}` instead? Then we know where
to look in the tests.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---