Fix deletion and file permissions
This commit is contained in:
parent
80a2e92265
commit
90d1e798c9
|
@ -37,15 +37,15 @@ do
|
|||
rm $MAILDIR/extracted/$i/$i
|
||||
for z in $MAILDIR/extracted/$i/*
|
||||
do
|
||||
cp -v $z $DESTINATION/$MSGDATE/$MSGTIME/$(basename $z)
|
||||
cp -v --no-preserve=mode,ownership $z $DESTINATION/$MSGDATE/$MSGTIME/$(basename $z)
|
||||
rm $z
|
||||
done
|
||||
done
|
||||
|
||||
shopt -u nullglob
|
||||
|
||||
if [[ $DEBUG -eq 0 ]]; then
|
||||
rm -fr $MAILDIR/extracted/$i/
|
||||
fi
|
||||
done
|
||||
|
||||
shopt -u nullglob
|
||||
|
||||
echo "[$(date '+%T')] Done!"
|
||||
|
|
Loading…
Reference in New Issue
Block a user