Skip to content

Commit ed1e991

Browse files
Iltar van der Bergfabpot
authored andcommitted
Filesystem::touch() not working with different owners (utime/atime issue)
1 parent 42a7645 commit ed1e991

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Filesystem.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,9 @@ public function exists($files)
100100
*/
101101
public function touch($files, $time = null, $atime = null)
102102
{
103-
if (null === $time) {
104-
$time = time();
105-
}
106-
107103
foreach ($this->toIterator($files) as $file) {
108-
if (true !== @touch($file, $time, $atime)) {
104+
$touch = $time ? @touch($file, $time, $atime) : @touch($file);
105+
if (true !== $touch) {
109106
throw new IOException(sprintf('Failed to touch %s', $file));
110107
}
111108
}

0 commit comments

Comments
 (0)