rm index and indexof
This commit is contained in:
@@ -1106,7 +1106,7 @@ function install_zip(zip_blob, target_dir) {
|
||||
parts.shift()
|
||||
var rel_path = text(parts, '/')
|
||||
var full_path = target_dir + '/' + rel_path
|
||||
var dir_path = text(full_path, 0, full_path.lastIndexOf('/'))
|
||||
var dir_path = fd.dirname(full_path)
|
||||
|
||||
if (!created_dirs[dir_path]) {
|
||||
ensure_dir(dir_path)
|
||||
@@ -1251,7 +1251,7 @@ Shop.get_package_dir = function(pkg) {
|
||||
// -> 'js_gitea_pockle_world_john_prosperon_sprite_use'
|
||||
Shop.c_symbol_for_file = function(pkg, file) {
|
||||
var pkg_safe = replace(replace(replace(pkg, '/', '_'), '.', '_'), '-', '_')
|
||||
var file_safe = replace(replace(text(file, 0, file.lastIndexOf('.')), '/', '_'), '.', '_')
|
||||
var file_safe = replace(replace(fd.stem(file), '/', '_'), '.', '_')
|
||||
return 'js_' + pkg_safe + '_' + file_safe + '_use'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user