Commit 884b21b3 authored by Romain Therville's avatar Romain Therville
Browse files

Update to the purge_directory() function.

New file types have been added to the exclusion to prevent log files
from being deleted.

issue #190
parent dafd0076
......@@ -160,6 +160,7 @@ class tx_nG6_utils {
return 0;
#Exclusion of the log files from the purge process
$stream = ssh2_exec($connection, 'find '.$directory.' -maxdepth 1 -not -name "*.html" -not -name "*.png" -not -name "*.log" -not -name "*.log.gz" -not -name "*.pdf" -not -name "md5sum.txt" -not -name "*GXB02039*" -not -name "*PCT0078*" -type f -exec rm -f {} \;');
$errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR);
// Enable blocking for both streams
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment