Skip to content
Browse files

- repo_arch: make it work with empty prefixes

  • Loading branch information...
1 parent ed6989e commit 0cf35d7cd690dd7b3a39b02c75c6d456a0096a14 @mlschroe mlschroe committed Sep 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/repo_arch.c
View
2 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);
}

0 comments on commit 0cf35d7

Please sign in to comment.
Something went wrong with that request. Please try again.