]> git.ipfire.org Git - pakfire.git/commitdiff
Add some more checks before assuming something may be a package file.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Dec 2012 23:19:43 +0000 (00:19 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Dec 2012 23:19:43 +0000 (00:19 +0100)
python/pakfire/base.py

index 70f4e2231820f12a81a223bf75ca43680eda7562..ef63c55b3359943f8b62aea5483fcd84bee903f2 100644 (file)
@@ -173,7 +173,7 @@ class Pakfire(object):
                                continue
 
                        # This looks like a file.
-                       elif os.path.exists(req):
+                       elif req.endswith(".%s" % PACKAGE_EXTENSION) and os.path.exists(req) and os.path.isfile(req):
                                local_packages.append(req)
                                continue