diff --git a/src/distroquery.c b/src/distroquery.c index 4d6f9a5..204253c 100644 --- a/src/distroquery.c +++ b/src/distroquery.c @@ -82,7 +82,7 @@ static struct configTag *firstconfigtag = NULL; char *query = ""; char *query_package; char *query_repository = "milestone2"; -char *query_arch = "i586"; +char *query_arch = NULL; int query_compact = 0; int query_limit = 10; int query_offset = 0; @@ -325,13 +325,13 @@ int findFileIdFromPath(sqlite3 *db, char* path) { char sql[PATH_MAX]; sqlite3_stmt* stmt1; - printf("[ROOT]", + printf("[ROOT]", query_repository, query_arch); while (frompos < strlen(path)) { pt = strchr(path + frompos, '/'); if (pt) topos = pt - path; else topos = strlen(path); strncpy(buffer, path + frompos, topos - frompos); - printf("/%s", + printf("/%s", query_repository, query_arch, buffer, buffer); snprintf(sql, PATH_MAX, "SELECT id FROM files WHERE parent=%d" " AND name='%s'", parent, buffer); @@ -379,7 +379,7 @@ void printFileBrowser() { printf("