Refuse a game folder whose path leaves no room for the game's files.

Windows and the build tools stop at 260 characters for a file's whole path, and a built game needs up to 128 below
its folder. A deeper folder made the build stop in the middle with a file "not found"; Begin Installation and the
install job now refuse it first and name both lengths.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 22:24:26 -05:00
parent 0a85e33e0f
commit 8c32aedabb
5 changed files with 71 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ from tkinter import filedialog
from .. import NAME, build, feed, gameini, gamefiles, jobs, locks, mods, saves, steam, versions, winsys
from ..context import Context
from ..paths import long_path_problem
from . import art, picture, sound
W, H = 1000, 640
@@ -966,6 +967,11 @@ class App:
self.choose_dump()
return
gd = self.game_dir()
too_long = long_path_problem(gd) # told here, not as a missing file halfway through the build
if too_long:
self.message = App.friendly(too_long)
self.render()
return
drop_partial_image(gd) # before the free space is measured
if free_gb(gd) < 34 and not (Path(gd) / 'romfs' / 'romfs.bin').is_file():
self.message = f'{drive_of(gd)} has {free_gb(gd):.0f} GB free; the game needs about 34 GB.'