summaryrefslogtreecommitdiff
path: root/src/pacman/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pacman/sync.c')
-rw-r--r--src/pacman/sync.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 215497f6..0c3151e1 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -1,7 +1,7 @@
/*
* sync.c
*
- * Copyright (c) 2006-2014 Pacman Development Team <pacman-dev@archlinux.org>
+ * Copyright (c) 2006-2015 Pacman Development Team <pacman-dev@archlinux.org>
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -94,7 +94,10 @@ static int sync_cleandb(const char *dbpath, int keep_used)
snprintf(path, PATH_MAX, "%s%s", dbpath, dname);
/* remove all non-skipped directories and non-database files */
- stat(path, &buf);
+ if(stat(path, &buf) == -1) {
+ pm_printf(ALPM_LOG_ERROR, _("could not remove %s: %s\n"),
+ path, strerror(errno));
+ }
if(S_ISDIR(buf.st_mode)) {
if(rmrf(path)) {
pm_printf(ALPM_LOG_ERROR, _("could not remove %s: %s\n"),