chiark / gitweb /
scanner: skip symlinks to avoid issues
authorDaniel Martí <mvdan@mvdan.cc>
Tue, 22 Sep 2015 20:03:42 +0000 (13:03 -0700)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 22 Sep 2015 20:03:42 +0000 (13:03 -0700)
If they resolve to a missing file, we don't care about them. If they resolve
to an existing file, we'll scan that file anyway.

fdroidserver/scanner.py

index c26438ad1128a7c434d06cf90858bbef9aa4c181..7f6d7d91d36b1b123a1f6be4ed980e763b45f07e 100644 (file)
@@ -140,8 +140,11 @@ def scan_source(build_dir, root_dir, thisbuild):
 
             # Path (relative) to the file
             fp = os.path.join(r, curfile)
-            fd = fp[len(build_dir) + 1:]
 
+            if os.path.islink(fp):
+                continue
+
+            fd = fp[len(build_dir) + 1:]
             ext = common.get_extension(fd)
 
             if ext == 'so':