Ignore:
Timestamp:
06/09/08 16:47:30 (4 years ago)
Author:
sys
Message:

Vérification suprression des générations (bug aléatoire windows).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Jav_GE/com/scenari/m/ge/generator/base/GeneratorBase.java

    r11034 r11168  
    937937                                        if (!vFile.fReexported) { 
    938938                                                // Cette URI n'a plus été traitée, on l'élimine. 
    939                                                 fDestRoot.hFindElemByPath(vFile.fUriDest).hRemove(); 
     939                                                xRemoveDst(fDestRoot.hFindElemByPath(vFile.fUriDest)); 
    940940                                                // On checkera si le dossier père ne devra pas être 
    941941                                                // supprimé. 
     
    17271727         */ 
    17281728        protected void wResetDestination(IWInstFormation pInstance, IWUser pActeur, String pMode, String pSupport, String pLangue) throws Exception { 
    1729                 fDestRoot.hRemove(); 
     1729                xRemoveDst(fDestRoot); 
    17301730                // Controle que tous les fichiers ont été supprimés. 
    17311731                List vList = fDestRoot.hGetNameChilds(IHSource.ALL_STATUS, null); 
     
    21312131                return pFolder.hFindSource(vNameFile); 
    21322132        } 
     2133         
     2134 
     2135        /** 
     2136         * Purge d'une destination avec vérification. 
     2137         * Bug aléatoire sur XP, le remove doit parfois être lancé 2 fois de suite, ou faut attendre. 
     2138         * Peut-etre que le fichier est recréé trop vite, pas clair... 
     2139         *  
     2140         * @return true si ok, false si echec à la purge. 
     2141         */ 
     2142        protected boolean xRemoveDst(IHSourceElem pDst) throws Exception{ 
     2143                if(!pDst.hRemove()) { 
     2144                        int vCount = 1; 
     2145                        while(vCount < 10) { 
     2146                                Thread.sleep(10); 
     2147                                if(pDst.hGetStatus()==IHSource.STATUS_NONE) return true; 
     2148                                if(pDst.hRemove()) return true; 
     2149                                vCount++; 
     2150                        } 
     2151                        throw new DestLockException("Impossible de supprimer définitivement "+pDst.hGetUrlFileFormat()); 
     2152                } 
     2153                return true; 
     2154        } 
    21332155 
    21342156        protected static int searchExporteFilesOnSrc(List l, String pSrc) { 
Note: See TracChangeset for help on using the changeset viewer.