summaryrefslogtreecommitdiff
path: root/giscanner/scannermain.py
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/scannermain.py')
-rw-r--r--giscanner/scannermain.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
index 154fe483..b6bbe9d7 100644
--- a/giscanner/scannermain.py
+++ b/giscanner/scannermain.py
@@ -503,6 +503,9 @@ def get_source_root_dirs(options, filenames):
if not hasattr(os.path, "commonpath"):
return dirs
+ if not dirs:
+ return []
+
common = os.path.commonpath(dirs)
# If the only common path is the root directory give up
if os.path.dirname(common) == common: