diff --git a/usd/importer.py b/usd/importer.py
index 90278f2..28648c1 100755
--- a/usd/importer.py
+++ b/usd/importer.py
@@ -84,6 +84,12 @@ def dsc_to_tree_hash(repo, dsc_path):
)
index_env = {'GIT_INDEX_FILE': os.path.join(temp_dir, 'index')}
+ cp = run(['find', extracted_dir, '-type', 'd', '-empty'])
+ if len(cp.stdout) > 0:
+ raise SourceExtractionException(
+ "Empty directory/ies found in source package, which "
+ "are not representable in git. Please report a bug at "
+ "https://bugs.launchpad.net/usd-importer.")
repo.git_run(
['--work-tree', extracted_dir, 'add', '-f', '-A'],
env=index_env,