Ubuntu Pastebin

Paste from nacc at Fri, 28 Apr 2017 00:26:13 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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,
Download as text