64
64
g_file_get_contents(path, &contents, NULL, &error);
67
67
g_warning("GError: '%s'\n", error->message);
69
71
if( contents != NULL ) {
70
72
lines = strsplit_no_copy(contents, '\n');
263
265
ritem->items = NULL;
264
266
ritem->last_update = 0;
266
if( (dp = opendir(path)) == NULL ) {
267
FILE_OP_ERROR(path, "opendir");
268
if( (dp = g_dir_open(path, 0, &error)) == NULL ) {
269
debug_print("g_dir_open on \"%s\" failed with error %d (%s)\n",
270
path, error->code, error->message);
272
while( (d = readdir(dp)) != NULL ) {
276
while( (d = g_dir_read_name(dp)) != NULL ) {
273
277
if( claws_is_exiting() ) {
279
if( d->d_name[0] != '.' && (num = to_number(d->d_name)) > 0 ) {
280
fname = g_strdup_printf("%s%c%s", path, G_DIR_SEPARATOR, d->d_name);
281
if( g_stat(fname, &st) < 0 ) {
282
debug_print("RSSyl: couldn't stat() file '%s', ignoring it\n", fname);
287
if( !S_ISREG(st.st_mode)) {
283
if( d[0] != '.' && (num = to_number(d)) > 0 ) {
284
fname = g_strdup_printf("%s%c%s", path, G_DIR_SEPARATOR, d);
285
if (!g_file_test(fname, G_FILE_TEST_IS_REGULAR)) {
288
286
debug_print("RSSyl: not a regular file: '%s', ignoring it\n", fname);
293
debug_print("RSSyl: starting to parse '%s'\n", d->d_name);
291
debug_print("RSSyl: starting to parse '%s'\n", d);
294
292
if( (item = rssyl_parse_folder_item_file(fname)) != NULL ) {
295
293
/* Find latest timestamp */
296
294
ctx = (RFeedCtx *)item->data;