Little change to vfs_recycle.c to use absolute paths when recycle:repository starts with a '/'. This allow for the use of a system wide recycle bin using something like: recycle:repository = /disks/ide1/samba/TrashBin/%S On some systems a system wide recycle bin is much more manageable than a separate recycle bin for each share. Unified diff patch: --- vfs_recycle.c 2004-12-27 16:27:49.000000000 +0100 +++ vfs_recycle.c.org 2004-12-15 15:33:13.000000000 +0100 @@ -223,8 +223,6 @@ new_dir = (char *)SMB_MALLOC(len + 1); ALLOC_CHECK(new_dir, done); *new_dir = '\0'; - if (dname[0] == '/') - safe_strcat(new_dir,"/",len); /* Create directory tree if neccessary */ for(token = strtok(tok_str, "/"); token; token = strtok(NULL, "/")) { @@ -338,7 +336,7 @@ repository = alloc_sub_conn(conn, recycle_repository(handle)); ALLOC_CHECK(repository, done); /* shouldn't we allow absolute path names here? --metze */ - trim_char(repository, '\0', '/'); + trim_char(repository, '/', '/'); if(!repository || *(repository) == '\0') { DEBUG(3, ("recycle: repository path not set, purging %s...\n", file_name));
Created attachment 872 [details] System wide recycle bin
Applied (even though patch was reversed !). Thanks, Jeremy.
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.