summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-05 11:25:40 -0400
committerDan McGee <dan@archlinux.org>2012-07-05 11:25:40 -0400
commit9d91cad678133e97345111fab2c103fcda9b9f28 (patch)
tree02a3272373d47e2628e57b7ea20edf65f29c6691
parentdaf011b67a338f26ead8058a9f9caedfe251c62c (diff)
reporead: handle files in root directory properly
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/management/commands/reporead.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 51c73c02..df29a8a7 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -283,7 +283,10 @@ def populate_files(dbpkg, repopkg, force=False):
len(repopkg.files), dbpkg.pkgname)
pkg_files = []
for f in repopkg.files:
- dirname, filename = f.rsplit('/', 1)
+ if '/' in f:
+ dirname, filename = f.rsplit('/', 1)
+ else:
+ dirname, filename = '', f
if filename == '':
filename = None
pkgfile = PackageFile(pkg=dbpkg,