Changeset 1547


Ignore:
Timestamp:
Oct 3, 2010, 4:09:50 AM (10 years ago)
Author:
roux
Message:

gestion redownload documents pas encore édités

Location:
cpc/trunk/project/batch/documents
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/batch/documents/download_docs.pl

    r1397 r1547  
    5151    }
    5252    if (-e "$type/$file") {
    53       next;
     53      system("grep -e 'pas encore édité' $type/$file > /dev/null");
     54      if ($? != 0) {
     55        next;
     56      }
    5457    }
    5558    if (!($type =~ /(^$)/)) {
     
    5962        print FILE $a->content;
    6063        close FILE;
    61         rename "$type/$file.tmp", "$type/$file";
    62         print "$type/$file\n";
     64        system("grep -e 'pas encore édité' $type/$file.tmp > /dev/null");
     65        if ($? != 0 || !(-e "$type/$file")) {
     66          rename "$type/$file.tmp", "$type/$file";
     67          print "$type/$file\n";
     68        } else {
     69          unlink("/$type/$file.tmp");
     70        }
    6371      }
    6472      $a->back();
Note: See TracChangeset for help on using the changeset viewer.