mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
FIX #16671 Can not generate zip file of documents in backup tool
This commit is contained in:
@@ -425,6 +425,13 @@ class FilesLibTest extends PHPUnit\Framework\TestCase
|
||||
$result=dol_uncompress($fileout, $dirout);
|
||||
print __METHOD__." result=".join(',', $result)."\n";
|
||||
$this->assertEquals(0, count($result), "Pb with dol_uncompress_file of file ".$fileout);
|
||||
|
||||
$excludefiles = '/(\.back|\.old|\.log|documents[\/\\\]admin[\/\\\]documents[\/\\\])/i';
|
||||
if (preg_match($excludefiles, 'a/temp/b')) { echo '----- Regex OK -----'."\n"; }
|
||||
$result=dol_compress_dir($dirout, $conf->admin->dir_temp.'/testdir.zip', 'zip', $excludefiles);
|
||||
print __METHOD__." result=".$result."\n";
|
||||
print join(', ', $conf->logbuffer);
|
||||
$this->assertGreaterThanOrEqual(1, $result, "Pb with dol_compress_dir of ".$dirout." into ".$conf->admin->dir_temp.'/testdir.zip');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user