aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sos/plugins/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index 713c7278..fda8fa29 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -734,6 +734,10 @@ class Plugin(object):
return
else:
if stat.S_ISDIR(st.st_mode) and os.access(srcpath, os.R_OK):
+ # copy empty directory
+ if not os.listdir(srcpath):
+ self.archive.add_dir(srcpath)
+ return
self._copy_dir(srcpath)
return