On Mon, Aug 31, 2009 at 14:01:37 +0200, Tino Keitel wrote: [...]
> Just a wild guess: I use XFS. From my experience, data like > struct dirent->d_type isn't filled by readdir() with XFS. This is It seems my guess was correct. The attached patch fixes the bug. Regards, Tino
--- dma-0.0.2009.07.17.orig/dma.c 2009-08-31 15:21:20.428972405 +0200 +++ dma-0.0.2009.07.17/dma.c 2009-08-31 15:27:39.014767112 +0200 @@ -1415,9 +1415,9 @@ LIST_INIT(&itmqueue.queue); /* ignore temp files */ - if (strncmp(de->d_name, "tmp_", 4) == 0 || - de->d_type != DT_REG) - continue; + if (strncmp(de->d_name, "tmp_", 4) == 0) + if(stat(de->d_name, &st) && !S_ISREG(st.st_mode)) + continue; if (asprintf(&queuefn, "%s/%s", config->spooldir, de->d_name) < 0) goto fail; seenit = seen(de->d_name);