Skip to content

Commit

Permalink
Ignore disk_free_space WARNING #52 (#53)
Browse files Browse the repository at this point in the history
* Ignore disk_free_space WARNING
  • Loading branch information
itn3rd77 authored and jdel committed Jul 24, 2018
1 parent 5f62bed commit a890e34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/SSpkS/Package/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ public function extractIfMissing($inPkgName, $targetFile)
}
// Try to extract file
$tmp_dir = sys_get_temp_dir();
$free_tmp = disk_free_space($tmp_dir);
if ($free_tmp < 2048) {
$free_tmp = @disk_free_space($tmp_dir);
if (!empty($free_tmp) && $free_tmp < 2048) {
throw new \Exception('TMP folder only has ' . $free_tmp . ' Bytes space available. Disk full!');
}
$free = disk_free_space(dirname($targetFile));
if ($free < 2048) {
$free = @disk_free_space(dirname($targetFile));
if (!empty($free) && $free < 2048) {
throw new \Exception('Package folder only has ' . $free . ' Bytes space available. Disk full!');
}
try {
Expand Down

0 comments on commit a890e34

Please sign in to comment.