xbps-remove: misc changes to the clean-cache mode.
- If orphans mode is not set, exit directly. - Simplify the clean-cache code to avoid unnecessary allocs in some cases.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2008-2014 Juan Romero Pardines.
|
||||
* Copyright (c) 2008-2015 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -269,7 +269,7 @@ main(int argc, char **argv)
|
||||
|
||||
if (clean_cache) {
|
||||
rv = clean_cachedir(&xh);
|
||||
if (rv != 0)
|
||||
if (!orphans || rv)
|
||||
exit(rv);;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user