@@ -332,10 +332,18 @@ int nchar;
332
332
if (nchar < 0 || nchar >= NPOW_10 ){
333
333
printf ("Buffer Overflow in assembling dirname\n" ); return FAILURE ;}
334
334
335
+ #ifdef FORCE_DEBUG
336
+ printf ("scanning %s for files\n" , d .name );
337
+ #endif
338
+
335
339
// directory listing
336
340
if ((d .N = scandir (d .name , & d .LIST , 0 , alphasort )) < 0 ){
337
341
return FAILURE ;}
338
342
343
+ #ifdef FORCE_DEBUG
344
+ printf ("found %d files, filtering now\n" );
345
+ #endif
346
+
339
347
// reflectance products
340
348
alloc_2D ((void * * * )& d .list , d .N , NPOW_10 , sizeof (char ));
341
349
@@ -356,7 +364,11 @@ int nchar;
356
364
// check against sensor list
357
365
for (s = 0 , vs = false; s < sen -> n ; s ++ ){
358
366
if (strstr (d .LIST [t ]-> d_name , sen -> sensor [s ]) != NULL ){
359
- vs = true; break ;
367
+ #ifdef FORCE_DEBUG
368
+ printf ("sensor is: %s\n" , sen -> sensor [s ]);
369
+ #endif
370
+ vs = true;
371
+ break ;
360
372
}
361
373
}
362
374
@@ -477,7 +489,7 @@ int n = 0;
477
489
// get mask file listing, skip if tile is empty
478
490
if (list_mask (tx , ty , phl , & dir ) == FAILURE ){
479
491
#ifdef FORCE_DEBUG
480
- printf ("No data in here. Skip.\n" );
492
+ printf ("No data in here (no mask) . Skip.\n" );
481
493
#endif
482
494
* success = CANCEL ;
483
495
return NULL ;
@@ -772,7 +784,7 @@ bool level3 = false;
772
784
// get ARD file listing, skip if tile is empty
773
785
if (list_ard (tx , ty , sen , phl , & dir ) == FAILURE ){
774
786
#ifdef FORCE_DEBUG
775
- printf ("No data in here. Skip.\n" );
787
+ printf ("No data in here (datasets) . Skip.\n" );
776
788
#endif
777
789
* nt = 0 ;
778
790
return NULL ;
0 commit comments