Commit 4070c5214c4d8fc4d1aecdfdec19120b05eb0c36

Authored by Elena.Budnik
1 parent a95d1dc4

long dir lists

src/DDSERVICES/REST/getLastRealUpdate.php
... ... @@ -25,7 +25,7 @@
25 25 {
26 26 $VI = $VI_NAME->item(0)->parentNode;
27 27 $location = $VI->getElementsByTagName("LOCATION")->item(0)->nodeValue;
28   - $find = 'find '.$location.'*.nc.gz -type f -printf %T@ %p\n | sort -n | tail -1 | cut -f2- -d" "';
  28 + $find = 'find '.$location.' -name \'*.nc.gz\' -type f -printf %T@ %p\n | sort -n | tail -1 | cut -f2- -d" "';
29 29 $lastFile = exec($find);
30 30 if (!file_exists($lastFile))
31 31 exit('NO SUCH FILE '.$lastFile);
... ...
src/DDSERVICES/SOAP/DDserverWeb.php
... ... @@ -348,9 +348,9 @@
348 348  
349 349 if ($VI->item(0)->nodeValue != NULL)
350 350 {
351   - $location = $VI->item(0)->parentNode->getElementsByTagName("LOCATION")->item(0)->nodeValue;
  351 + $location = $VI->item(0)->parentNode->getElementsByTagName("LOCATION")->item(0)->nodeValue;
352 352  
353   - $find = 'find '.$location.'*.nc.gz -type f -printf %T@ %p\n | sort -n | tail -1 | cut -f2- -d" "';
  353 + $find = 'find '.$location.' -name \'*.nc.gz\' -type f -printf %T@ %p\n | sort -n | tail -1 | cut -f2- -d" "';
354 354 $lastFile = exec($find);
355 355 if (!file_exists($lastFile))
356 356 exit('NO SUCH FILE '.$lastFile);
... ...