mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vweb: fix typo in 'assets.v'
This commit is contained in:
parent
8f9979eb8d
commit
e9827f5a34
@ -87,7 +87,7 @@ fn (am mut AssetManager) combine(asset_type string, to_file bool) string {
|
||||
}
|
||||
// rebuild
|
||||
for asset in am.get_assets(asset_type) {
|
||||
mut data := os.read_file(asset.file_path) or {
|
||||
data := os.read_file(asset.file_path) or {
|
||||
return ''
|
||||
}
|
||||
out += data
|
||||
@ -118,8 +118,8 @@ fn (am mut AssetManager) get_cache_key(asset_type string) string {
|
||||
mut latest_modified := 0
|
||||
for asset in am.get_assets(asset_type) {
|
||||
files_salt += asset.file_path
|
||||
if asset.last_modified.uni > latest_modified {
|
||||
latest_modified = asset.last_modified.uni
|
||||
if asset.last_modified.unix > latest_modified {
|
||||
latest_modified = asset.last_modified.unix
|
||||
}
|
||||
}
|
||||
hash := md5.sum(files_salt.bytes()).hex()
|
||||
@ -159,7 +159,7 @@ fn (am mut AssetManager) add(asset_type, file string) bool {
|
||||
}
|
||||
asset := Asset{
|
||||
file_path: file
|
||||
last_modified: time.Time{uni: os.file_last_mod_unix(file)}
|
||||
last_modified: time.Time{unix: os.file_last_mod_unix(file)}
|
||||
}
|
||||
if asset_type == 'css' {
|
||||
am.css << asset
|
||||
|
Loading…
Reference in New Issue
Block a user