commit b36805f3c54fe0e50e58bb9e6dad66daca46fbf6 Author: Heikki Linnakangas <heikki.linnakan...@iki.fi> Date: Sun Jun 28 21:35:51 2015 +0300
... |@@ -175,22 +175,31 @@ libpqProcessFileList(void) | pg_fatal("unexpected result set while fetching file list\n"); | | /* Read result to local variables */ | for (i = 0; i < PQntuples(res); i++) | { | char *path = PQgetvalue(res, i, 0); | int filesize = atoi(PQgetvalue(res, i, 1)); | bool isdir = (strcmp(PQgetvalue(res, i, 2), "t") == 0); | char *link_target = PQgetvalue(res, i, 3); | file_type_t type; | |+ if (PQgetisnull(res, 0, 1)) ... |+ continue; Every other access to "res" in this loop is to res(i), which I believe is what was intended here, too. Currently, it will dumbly loop but skip *every* row if the 2nd column (1: size) of the first row (0) is null. -- Justin