Skip to content

Commit 10d8901

Browse files
committed
supress chmod and touch warnings
On some file systems these commands will fail. It's unclear what systems those are, I can reproduce it for touch() on my android phone (but not on my tablet). Instead of littering the output with potentially thousands of warnings we supress them here. Ideally we should probably do something with them, but I don't know what. Maybe a strict setting that turns them into exceptions, would work? PRs welcome.
1 parent cabfd12 commit 10d8901

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Tar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public function extract($outdir, $strip = '', $exclude = '', $include = '')
184184
}
185185

186186
fclose($fp);
187-
touch($output, $fileinfo->getMtime());
188-
chmod($output, $fileinfo->getMode());
187+
@touch($output, $fileinfo->getMtime());
188+
@chmod($output, $fileinfo->getMode());
189189
} else {
190190
$this->skipbytes(ceil($header['size'] / 512) * 512); // the size is usually 0 for directories
191191
}

src/Zip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ public function extract($outdir, $strip = '', $exclude = '', $include = '')
232232
unlink($extractto); // remove temporary gz file
233233
}
234234

235-
touch($output, $fileinfo->getMtime());
235+
@touch($output, $fileinfo->getMtime());
236236
//FIXME what about permissions?
237237
if(is_callable($this->callback)) {
238238
call_user_func($this->callback, $fileinfo);

0 commit comments

Comments
 (0)