rm index and indexof

This commit is contained in:
2026-01-17 16:21:02 -06:00
parent 97ece8e5cb
commit a7a323a74e
19 changed files with 86 additions and 303 deletions

View File

@@ -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'
}