We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78baca7 commit 2bddc22Copy full SHA for 2bddc22
ptrack.c
@@ -402,12 +402,21 @@ ptrack_filelist_getnext(PtScanCtx * ctx)
402
if (list_length(ctx->filelist) == 0)
403
return -1;
404
405
+#ifdef foreach_current_index
406
+ /* Get first file from the head */
407
+ cell = list_tail(ctx->filelist);
408
+ pfl = (PtrackFileList_i *) lfirst(cell);
409
+
410
+ /* Remove this file from the list */
411
+ ctx->filelist = list_delete_last(ctx->filelist);
412
+#else
413
/* Get first file from the head */
414
cell = list_head(ctx->filelist);
415
pfl = (PtrackFileList_i *) lfirst(cell);
416
417
/* Remove this file from the list */
418
ctx->filelist = list_delete_first(ctx->filelist);
419
+#endif
420
421
if (pfl->segno > 0)
422
{
0 commit comments