diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-11-30 12:40:15 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-11-30 12:40:16 +0900 |
commit | 51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a (patch) | |
tree | 778194706f6f8a417899f6070be7308107bc92bb /src/repodata.c | |
parent | 22e701e553344eeb22f88ed0906d76c9a5e39d83 (diff) | |
download | libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.tar.gz libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.tar.bz2 libsolv-51a3a2ac14ea0b18ccbe47ce771d5c962aa0800a.zip |
Imported Upstream version 0.6.25upstream/0.6.25
Change-Id: I4c41182d0968927b2dc78980b41c0b7c2e931a4a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'src/repodata.c')
-rw-r--r-- | src/repodata.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/repodata.c b/src/repodata.c index b611afc..027c24c 100644 --- a/src/repodata.c +++ b/src/repodata.c @@ -268,17 +268,13 @@ repodata_str2dir(Repodata *data, const char *dir, int create) #endif const char *dire; - parent = 0; if (!*dir) - return 0; + return data->dirpool.ndirs ? 0 : dirpool_add_dir(&data->dirpool, 0, 0, create); while (*dir == '/' && dir[1] == '/') dir++; if (*dir == '/' && !dir[1]) - { - if (data->dirpool.ndirs) - return 1; - return dirpool_add_dir(&data->dirpool, 0, 1, create); - } + return data->dirpool.ndirs ? 1 : dirpool_add_dir(&data->dirpool, 0, 1, create); + parent = 0; #ifdef DIRCACHE_SIZE dirs = dir; if (data->dircache) |