mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb assets: the assets cache files are now immutable after creation. (#1454)
This commit is contained in:
parent
45e76609b0
commit
93d27b0b9f
@ -77,13 +77,13 @@ fn (am mut AssetManager) combine(asset_type string, to_file bool) string {
|
||||
mut out := ''
|
||||
// use cache
|
||||
if os.file_exists(out_file) {
|
||||
if to_file {
|
||||
return out_file
|
||||
}
|
||||
cached := os.read_file(out_file) or {
|
||||
return ''
|
||||
}
|
||||
out = cached
|
||||
if !to_file {
|
||||
return out
|
||||
}
|
||||
return cached
|
||||
}
|
||||
// rebuild
|
||||
for asset in am.get_assets(asset_type) {
|
||||
|
Loading…
Reference in New Issue
Block a user