From c7117e17bed9cc0dec38264ee31463d5ef56ac4c Mon Sep 17 00:00:00 2001 From: "Damien F. Katz" Date: Sat, 3 Jul 2010 04:25:06 +0000 Subject: 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 --- src/couchdb/couch_server.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/couchdb/couch_server.erl') 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}; -- cgit v1.2.3