Commit 592b26d2 authored by Gerald Salin's avatar Gerald Salin
Browse files

#72 replace delete files in purge_directory

parent 0bfa01f5
...@@ -160,7 +160,8 @@ class tx_nG6_utils { ...@@ -160,7 +160,8 @@ class tx_nG6_utils {
return 0; return 0;
} }
$stream = ssh2_exec($connection, 'ls '.$directory.'/* | grep -v -e ".html$" -e ".png$" | xargs rm -f' ); // $stream = ssh2_exec($connection, 'ls '.$directory.'/* | grep -v -e ".html$" -e ".png$" | xargs rm -f' );
$stream = ssh2_exec($connection, 'find '.$directory.' -maxdepth 1 -not -name "*.html" -not -name "*.png" -type f -exec rm -f {} \;');
$errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR); $errorStream = ssh2_fetch_stream($stream, SSH2_STREAM_STDERR);
// Enable blocking for both streams // Enable blocking for both streams
stream_set_blocking($errorStream, true); stream_set_blocking($errorStream, true);
......
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