Update car monitor asset reload and telemetry
This commit is contained in:
1 parent
6f965f8f3e
commit
5d75ad81bd
8 files changed
+4334
-4366
No files matched your search
+2
-3
@@ -59,12 +59,11 @@ $assets = [];
|
||||
foreach (collect_asset_files($root, $scanRoots) as $fullPath) {
|
||||
$relativePath = ltrim(str_replace($rootPath ?: $root, '', $fullPath), DIRECTORY_SEPARATOR);
|
||||
$fileHash = is_readable($fullPath) ? (hash_file('sha256', $fullPath) ?: 'hash-failed') : 'unreadable';
|
||||
$fileVersion = (string)filemtime($fullPath) . '-' . substr($fileHash, 0, 10);
|
||||
$publicPath = '/car/' . str_replace(DIRECTORY_SEPARATOR, '/', $relativePath);
|
||||
$fileVersion = substr($fileHash, 0, 16);
|
||||
$publicPath = '/custom/car/' . str_replace(DIRECTORY_SEPARATOR, '/', $relativePath);
|
||||
$fingerprints[] = implode('|', [
|
||||
ltrim($publicPath, '/'),
|
||||
(string)filesize($fullPath),
|
||||
(string)filemtime($fullPath),
|
||||
$fileHash,
|
||||
]);
|
||||
$assets[$publicPath] = $fileVersion;
|
||||
|
||||
Reference in new issue
Block a user