Changeset 420


Ignore:
Timestamp:
02/07/11 09:44:56 (13 years ago)
Author:
mmaipsl
Message:

Protect use chmod if there is no file in directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r414 r420  
    306306{ 
    307307    IGCM_debug_PushStack "IGCM_SmoothModulo" 
    308  
    309     set -vx 
    310308    typeset defVector ModValue 
    311309 
     
    348346{ 
    349347    IGCM_debug_PushStack "IGCM_comp_GetInputSmoothFiles" 
    350  
    351     set -vx 
    352348 
    353349    # Debug Print : 
     
    718714        fi 
    719715    done 
    720     IGCM_sys_Chmod u+rw * 
     716 
     717    typeset NbFichs 
     718    NbFiles=$( ls * > /dev/null 2>&1 | wc -l ) 
     719    if [ ${NbFiles} -gt 0 ] ; then 
     720        IGCM_sys_Chmod u+rw * 
     721    fi 
    721722 
    722723    IGCM_debug_PopStack "IGCM_comp_GetInputRestartFiles" 
Note: See TracChangeset for help on using the changeset viewer.