Update of /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/oscar
In directory sc8-pr-cvs1:/tmp/cvs-serv16487
Modified Files:
DCalculOscar.java
Log Message:
OH.
Index: DCalculOscar.java
===================================================================
RCS file: /cvsroot/fudaa/fudaa_devel/dodico/src/org/fudaa/dodico/oscar/DCalculOscar.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DCalculOscar.java 29 Jan 2003 12:14:30 -0000 1.1
--- DCalculOscar.java 6 Feb 2003 16:53:10 -0000 1.2
***************
*** 115,122 ****
String drive;
String path=cheminServeur();
- String etude=null;
SParametresOscar _p = params.parametresOscar();
! etude=_p.parametresGeneraux.projet+String.valueOf(System.currentTimeMillis());
String _mode = _p.parametresGeneraux.choixCalculSol;
--- 115,126 ----
String drive;
String path=cheminServeur();
SParametresOscar _p = params.parametresOscar();
! String timestamp=String.valueOf(System.currentTimeMillis());
! String etude="e"+timestamp.substring(timestamp.length()-8,timestamp.length());
! while((new File(etude+".dat")).exists()){
! timestamp=String.valueOf(System.currentTimeMillis());
! etude="e"+timestamp.substring(timestamp.length()-8,timestamp.length());
! }
String _mode = _p.parametresGeneraux.choixCalculSol;
***************
*** 159,163 ****
// On efface les fichiers temporaires utilisés par le code de calcul
-
File _tmp;
File _tmpo;
--- 163,166 ----
***************
*** 166,190 ****
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".dat");
! if(_tmpo.exists() && !(_tmpo.renameTo(_tmp))) _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.res");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".res");
! if(_tmpo.exists() && !(_tmpo.renameTo(_tmp))) _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.rid");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".rid");
! if(_tmpo.exists() && !(_tmpo.renameTo(_tmp))) _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.diag");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".diag");
! if(_tmpo.exists() && !(_tmpo.renameTo(_tmp))) _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.err");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".err");
! if(_tmpo.exists() && !(_tmpo.renameTo(_tmp))) _tmpo.delete();
}
--- 169,198 ----
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".dat");
! _tmpo.renameTo(_tmp);
! _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.res");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".res");
! _tmpo.renameTo(_tmp);
! _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.rid");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".rid");
! _tmpo.renameTo(_tmp);
! _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.diag");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".diag");
! _tmpo.renameTo(_tmp);
! _tmpo.delete();
_tmp = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+"oscar.err");
if(_tmp.exists())_tmp.delete();
_tmpo = new File(etude+".err");
! _tmpo.renameTo(_tmp);
! _tmpo.delete();
}
|