sign bug on FileFindNext function

 

With this example code...

   long search_handle=FileFindFirst("*",file_name);
   if(search_handle!=INVALID_HANDLE)
   {
      do
      {
         Print("file_name = ", file_name);
      }
      while( FileFindNext(search_handle,file_name) );

      FileFindClose(search_handle);
   }
   else
      Print("Files not found!");

the result is:

2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test5.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test4.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test3.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test2.tx
2014.03.19 10:16:23.483 #Test EURUSD,H1: file_name = Test1.txt

the FileFindNext function cut the last character

Thanks

 

I got the same with Build 625, only the first match returns full file_name

   string filt=InpFolder+"\\"+InpFilter;
   long search_handle=FileFindFirst(filt,file_name);
   if(search_handle!=INVALID_HANDLE){
      do{
         if(FileIsExist(InpFolder+"\\"+file_name))
            Print("Found & exists :"+file_name);
         else
            Print("Found &~exists :"+file_name);
         
      } while(FileFindNext(search_handle,file_name));

      FileFindClose(search_handle);
   } else
      Print("No files found!");


2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :XAUUSD1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USOil1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USDJPY1.cs
2014.03.27 08:03:46.623	Conv_CSV EURUSD,M1: Found &~exists :USDCHF1.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found &~exists :US301.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found &~exists :ITA401.cs
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: Found & exists :GER301.csv
2014.03.27 08:03:46.622	Conv_CSV EURUSD,M1: initialized

As It was my first time using these functions, I workarounded and didnt further research.

Any idea?

 
Bug
 
angevoyageur:
You have to report it to the ServiceDesk of Metaquotes.

Just done. Thanks.
Reason: