Skip to content

Commit e3ed0d5

Browse files
committed
create merged folder using the shell
1 parent cda07da commit e3ed0d5

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "wh3mm",
33
"productName": "wh3mm",
4-
"version": "1.26.3",
4+
"version": "1.26.4",
55
"description": "WH3 Mod Manager",
66
"main": ".webpack/main",
77
"scripts": {

src/ModRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function ModRow() {
2424
const isAuthorEnabled = useAppSelector((state) => state.app.isAuthorEnabled);
2525
const areThumbnailsEnabled = useAppSelector((state) => state.app.areThumbnailsEnabled);
2626

27-
const [sortingType, setSortingType] = useState<SortingType>(SortingType.Ordered);
27+
const [sortingType, setSortingType] = useState<SortingType>(SortingType.IsEnabled);
2828
const [isDropdownOpen, setIsDropdownOpen] = useState<boolean>(false);
2929
const [contextMenuMod, setContextMenuMod] = useState<Mod>();
3030

src/index.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,16 @@ const getAllMods = async (mainWindow: BrowserWindow) => {
336336
});
337337
}
338338
if (!mergedWatcher || isDev) {
339-
await fsExtra.ensureDir(nodePath.join(appData.gamePath, "/merged/"));
339+
const mergedDirPath = nodePath.join(appData.gamePath, "/merged/");
340+
exec(`mkdir "${mergedDirPath}"`);
341+
342+
while (!fsExtra.existsSync(mergedDirPath)) {
343+
await new Promise((resolve) => {
344+
setTimeout(resolve, 100);
345+
});
346+
}
347+
348+
// await fsExtra.ensureDir(nodePath.join(appData.gamePath, "/merged/"));
340349
const gamePath = appData.gamePath.replaceAll("\\", "/").replaceAll("//", "/");
341350
mergedWatcher = chokidar
342351
.watch([`${gamePath}/merged/*.pack`], {

0 commit comments

Comments
 (0)