summaryrefslogtreecommitdiff
path: root/ext/repo_arch.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2012-09-06 14:19:16 +0200
committerMichael Schroeder <mls@suse.de>2012-09-06 14:19:16 +0200
commit0cf35d7cd690dd7b3a39b02c75c6d456a0096a14 (patch)
treeb8681cf531205588588e534c3ea5d24d868cad28 /ext/repo_arch.c
parented6989e7111f65590be3ded9e8908c0388ce1b32 (diff)
downloadlibsolv-0cf35d7cd690dd7b3a39b02c75c6d456a0096a14.tar.gz
libsolv-0cf35d7cd690dd7b3a39b02c75c6d456a0096a14.tar.bz2
libsolv-0cf35d7cd690dd7b3a39b02c75c6d456a0096a14.zip
- repo_arch: make it work with empty prefixes
Diffstat (limited to 'ext/repo_arch.c')
-rw-r--r--ext/repo_arch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/repo_arch.c b/ext/repo_arch.c
index dfa2ac8..5151803 100644
--- a/ext/repo_arch.c
+++ b/ext/repo_arch.c
@@ -256,7 +256,7 @@ static int gettarhead(struct tarhead *th)
memcpy(prefix, th->blk + 345, 155);
prefix[155] = 0;
l = strlen(prefix);
- if (prefix[l - 1] == '/')
+ if (l && prefix[l - 1] == '/')
prefix[l - 1] = 0;
th->path = solv_dupjoin(prefix, "/", path);
}