diff options
author | Damien F. Katz <damien@apache.org> | 2010-07-03 04:25:06 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2010-07-03 04:25:06 +0000 |
commit | c7117e17bed9cc0dec38264ee31463d5ef56ac4c (patch) | |
tree | cbfa756df445aefce25dcc6399e045e83c2efd31 /src/couchdb/couch_server.erl | |
parent | d0e2510ccb74b61a62e32f75c35396f62556c2f7 (diff) |
Fix deletion to move properly to root of storage, to avoid copying files when view and database dirs are on different mounts.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@960153 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_server.erl')
-rw-r--r-- | src/couchdb/couch_server.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl index 84a02d13..43fd9044 100644 --- a/src/couchdb/couch_server.erl +++ b/src/couchdb/couch_server.erl @@ -131,7 +131,7 @@ init([]) -> gen_server:call(couch_server, {set_max_dbs_open, list_to_integer(Max)}) end), - ok = couch_file:init_delete_dir(), + ok = couch_file:init_delete_dir(RootDir), hash_admin_passwords(), ok = couch_config:register( fun("admins", _Key, _Value, Persist) -> @@ -351,9 +351,9 @@ handle_call({delete, DbName, _Options}, _From, Server) -> %% Delete any leftover .compact files. If we don't do this a subsequent %% request for this DB will try to open the .compact file and use it. - couch_file:delete(FullFilepath ++ ".compact"), + couch_file:delete(Server#server.root_dir, FullFilepath ++ ".compact"), - case couch_file:delete(FullFilepath) of + case couch_file:delete(Server#server.root_dir, FullFilepath) of ok -> couch_db_update_notifier:notify({deleted, DbName}), {reply, ok, Server2}; |