fix: path normalization

This commit is contained in:
TrèsAbhi committed 2025-11-26 13:38:40 -06:00
1 parent 9cb1d0cb3f
commit d633874d90
4 files changed
+9 -7

No files matched your search

+4 -2
View File
@@ -1,4 +1,5 @@
import { XMLParser } from "fast-xml-parser";
import { normalize } from "path/posix";
import SteamUser, { EConnectionProtocol } from "steam-user";
import { parse } from "yaml";
import { readDVPL } from "../blitz";
@@ -81,11 +82,12 @@ export class SteamVFS {
}
has(path: string) {
const dvplPath = `${path}.dvpl`;
const normalized = normalize(path);
const dvplPath = `${normalized}.dvpl`;
return (
(this.manifest.has(dvplPath) && dvplPath) ||
(this.manifest.has(path) && path)
(this.manifest.has(normalized) && normalized)
);
}
@@ -577,7 +577,7 @@ export async function definitions() {
.then((response) => response.text())
.then((string) => parseYaml(string) as BlitzStrings);
const preInstalled = await vfs.yaml<BlitzStrings>(
'Data/Strings/${blitzLocale}.yaml'
`Data/Strings/${blitzLocale}.yaml`
);
stringsI18n[locale] = {
@@ -7,11 +7,11 @@ export async function readTexture(path: string) {
const resolvedTexturePath = isDds
? ddsTexturePath
: ddsTexturePath.replace(".dds", ".pvr");
const decompressedDvpl = await vfs.file(`${resolvedTexturePath}.dvpl`);
const file = await vfs.file(resolvedTexturePath);
const raw = isDds
? await new DdsReadStream(decompressedDvpl.buffer as ArrayBuffer).dds()
: new PvrReadStream(decompressedDvpl.buffer as ArrayBuffer).pvr();
? await new DdsReadStream(file.buffer as ArrayBuffer).dds()
: new PvrReadStream(file.buffer as ArrayBuffer).pvr();
return raw;
}
@@ -99,7 +99,7 @@ export class AssetUploader {
}
if (diff.status === DiffStatus.Unchanged) {
// console.log(`🔵 ${change.path}`);
console.log(`🔵 ${change.path}`);
} else {
console.log(
`${diff.status === DiffStatus.New ? "🟢" : "🟡"} (${