1 |
Closes: https://bugs.gentoo.org/671592 |
2 |
Signed-off-by: Matt Turner <mattst88@g.o> |
3 |
--- |
4 |
pym/gentoolkit/eclean/clean.py | 4 ++++ |
5 |
1 file changed, 4 insertions(+) |
6 |
|
7 |
diff --git a/pym/gentoolkit/eclean/clean.py b/pym/gentoolkit/eclean/clean.py |
8 |
index b790de0..89300ce 100644 |
9 |
--- a/pym/gentoolkit/eclean/clean.py |
10 |
+++ b/pym/gentoolkit/eclean/clean.py |
11 |
@@ -139,6 +139,10 @@ class CleanUp(object): |
12 |
# only count size if successfully deleted and not a link |
13 |
if statinfo.st_nlink == 1: |
14 |
clean_size += statinfo.st_size |
15 |
+ try: |
16 |
+ os.rmdir(os.path.dirname(file_)) |
17 |
+ except OSError as er: |
18 |
+ pass |
19 |
except EnvironmentError as er: |
20 |
print( pp.error("Could not delete "+file_), file=sys.stderr) |
21 |
print( pp.error("Error: %s" %str(er)), file=sys.stderr) |
22 |
-- |
23 |
2.23.0 |