projects
/
services
/
createrepo_c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fa1f2f
)
Use '.' for same directory in database filelist instead of ''
author
Tomas Mlcoch
<tmlcoch@redhat.com>
Mon, 26 Nov 2012 11:15:42 +0000
(12:15 +0100)
committer
Tomas Mlcoch
<tmlcoch@redhat.com>
Mon, 26 Nov 2012 11:15:42 +0000
(12:15 +0100)
src/sqlite.c
patch
|
blob
|
history
diff --git
a/src/sqlite.c
b/src/sqlite.c
index
23293a9
..
4ec32e6
100644
(file)
--- a/
src/sqlite.c
+++ b/
src/sqlite.c
@@
-930,6
+930,12
@@
write_file (gpointer key, gpointer value, gpointer user_data)
key_len--;
}
+ if (key_len == 0) {
+ // Same directory is represented by '.' in database
+ key = ".";
+ key_len = 1;
+ }
+
sqlite3_bind_int (info->handle, 1, info->pkgKey);
sqlite3_bind_text (info->handle, 2, (const char *) key, (int) key_len, SQLITE_STATIC);
sqlite3_bind_text (info->handle, 3, file->files->str, -1, SQLITE_STATIC);