Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
New name hopefully makes it clearer this is a custom manifest file, not
to be confused with the common manifest.json file required by
Thunderstore ecosystem.
  • Loading branch information
anttimaki committed Feb 18, 2025
1 parent eb4dd72 commit 260adfe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/r2mm/installing/LocalModInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class LocalModInstaller extends LocalModInstallerProvider {
* be used in troubleshooting, telling us that the version of the mod isn't
* necessarily the same that's available via Thunderstore API.
*/
private async writeManifestToCache(cacheDirectory: string, manifest: ManifestV2) {
private async writeCustomManifestToCache(cacheDirectory: string, manifest: ManifestV2) {
const manifestPath: string = path.join(cacheDirectory, 'mm_v2_manifest.json');

if (await FsProvider.instance.exists(manifestPath)) {
Expand All @@ -45,7 +45,7 @@ export default class LocalModInstaller extends LocalModInstallerProvider {
public async extractToCacheWithManifestData(profile: ImmutableProfile, zipFile: string, manifest: ManifestV2) {
const cacheDirectory: string = await this.initialiseCacheDirectory(manifest);
await ZipExtract.extractOnly(zipFile, cacheDirectory);
await this.writeManifestToCache(cacheDirectory, manifest);
await this.writeCustomManifestToCache(cacheDirectory, manifest);
await ProfileInstallerProvider.instance.uninstallMod(manifest, profile);
throwForR2Error(await ProfileInstallerProvider.instance.installMod(manifest, profile));
throwForR2Error(await ProfileModList.addMod(manifest, profile));
Expand All @@ -56,7 +56,7 @@ export default class LocalModInstaller extends LocalModInstallerProvider {
const cacheDirectory: string = await this.initialiseCacheDirectory(manifest);
const fileSafe = file.split("\\").join("/");
await FsProvider.instance.copyFile(fileSafe, path.join(cacheDirectory, path.basename(fileSafe)));
await this.writeManifestToCache(cacheDirectory, manifest);
await this.writeCustomManifestToCache(cacheDirectory, manifest);
} catch (e) {
throw R2Error.fromThrownValue(e, "Error moving file to cache");
}
Expand Down

0 comments on commit 260adfe

Please sign in to comment.