Skip to content

Commit

Permalink
Make sure *all* directories are treated last
Browse files Browse the repository at this point in the history
  • Loading branch information
megastep committed Feb 8, 2005
1 parent 425d6f0 commit 1ab02b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions uninstall.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Parses the product INI file in ~/.loki/installed/ and uninstalls the software.
*/

/* $Id: uninstall.c,v 1.60 2004-09-25 00:47:31 megastep Exp $ */
/* $Id: uninstall.c,v 1.61 2005-02-08 20:41:56 megastep Exp $ */

#include <stdlib.h>
#include <stdio.h>
Expand Down Expand Up @@ -153,7 +153,7 @@ int uninstall_component(product_component_t *comp, product_info_t *info)
const char *fname = loki_getpath_file(file);
file_type_t t = loki_gettype_file(file);

if ( t == LOKI_FILE_DIRECTORY && strncmp(fname, info->root, strlen(fname))!=0 ) {
if ( t == LOKI_FILE_DIRECTORY /* && strncmp(fname, info->root, strlen(fname))!=0 */ ) {
list = add_directory_entry(file, list);
file = loki_getnext_file(file);
} else {
Expand All @@ -162,12 +162,12 @@ int uninstall_component(product_component_t *comp, product_info_t *info)
break;
case LOKI_FILE_RPM:
printf(_("Notice: the %s RPM was installed for this product.\n"),
loki_getpath_file(file));
fname);
break;
default:
// printf("Removing file: %s\n", loki_getpath_file(file));
if ( unlink(loki_getpath_file(file)) < 0 ) {
log_file(loki_getpath_file(file), strerror(errno));
if ( unlink(fname) < 0 ) {
log_file(fname, strerror(errno));
}
break;
}
Expand Down

0 comments on commit 1ab02b3

Please sign in to comment.