FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-19-2011, 08:13 PM
Dan McGee
 
Default Search for non-prefixed paths in skip_remove list

We add them to this list with the root path not appended; we should be
searching for them this way as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
lib/libalpm/remove.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/libalpm/remove.c b/lib/libalpm/remove.c
index 8021702..c6a3efc 100644
--- a/lib/libalpm/remove.c
+++ b/lib/libalpm/remove.c
@@ -216,12 +216,12 @@ static int can_remove_file(alpm_handle_t *handle, const alpm_file_t *file,
{
char filepath[PATH_MAX];

- snprintf(filepath, PATH_MAX, "%s%s", handle->root, file->name);
-
- if(alpm_list_find_str(skip_remove, filepath)) {
+ if(alpm_list_find_str(skip_remove, file->name)) {
/* return success because we will never actually remove this file */
return 1;
}
+
+ snprintf(filepath, PATH_MAX, "%s%s", handle->root, file->name);
/* If we fail write permissions due to a read-only filesystem, abort.
* Assume all other possible failures are covered somewhere else */
if(_alpm_access(handle, NULL, filepath, W_OK) == -1) {
--
1.7.6.1
 

Thread Tools




All times are GMT. The time now is 10:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org