Filesystem::touch() not working with different owners (utime/atime issue)
This commit is contained in:
parent
499c9e6fdc
commit
06e21fff03
@ -100,12 +100,9 @@ class Filesystem
|
|||||||
*/
|
*/
|
||||||
public function touch($files, $time = null, $atime = null)
|
public function touch($files, $time = null, $atime = null)
|
||||||
{
|
{
|
||||||
if (null === $time) {
|
|
||||||
$time = time();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($this->toIterator($files) as $file) {
|
foreach ($this->toIterator($files) as $file) {
|
||||||
if (true !== @touch($file, $time, $atime)) {
|
$touch = $time ? @touch($file, $time, $atime) : @touch($file);
|
||||||
|
if (true !== $touch) {
|
||||||
throw new IOException(sprintf('Failed to touch %s', $file));
|
throw new IOException(sprintf('Failed to touch %s', $file));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user