Skip to content

Commit a5fb28b

Browse files
committed
Enhanced Storage::writePackagesJson() to touch file after update
1 parent e22d364 commit a5fb28b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Storage.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,12 @@ protected function writePackagesJson($hash)
196196
],
197197
];
198198
$this->getLocker()->lock();
199+
$filename = $this->buildPath('packages.json');
199200
try {
200-
if (file_put_contents($this->buildPath('packages.json'), Json::encode($data)) === false) {
201+
if (file_put_contents($filename, Json::encode($data)) === false) {
201202
throw new AssetFileStorageException('Failed to write main packages.json');
202203
}
204+
touch($filename);
203205
} finally {
204206
$this->getLocker()->release();
205207
}

0 commit comments

Comments
 (0)