Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Report a dependency folder too deep for Git as a long path

Bowen Xue3194f11455cf
diff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.py
index 6797aee..177a4e0 100644
--- a/freevideo_engine/failure_details.py
+++ b/freevideo_engine/failure_details.py
@@ -586,7 +586,7 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep
('A video is still generating', '还有视频正在生成'),
('The update is installed. Click Connect again after the job finishes to restart ComfyUI with it.',
'更新已装好。等当前任务完成后点“重新连接”,ComfyUI 会重启并使用新版。')),
- (r'WinError 206|The filename or extension is too long', 'path-too-long',
+ (r'WinError 206|The filename or extension is too long|is too long for Git to read', 'path-too-long',
("The installation folder's path is too long", '安装文件夹的路径太长'),
('Install FreeVideo in a folder with a shorter path, such as D:\\FreeVideo, then click "Retry installation".',
'请把 FreeVideo 安装到路径较短的文件夹,例如 D:\\FreeVideo,然后点击“重试安装”。')),
@@ -677,6 +677,12 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep
model, capability = found.groups()
detail = ('检测到:%s,计算能力 %s' if zh else 'Detected: %s, compute capability %s') % (model, capability)
return dict(title=title[zh], detail=detail + '\n' + action[zh], action='', kind=kind)
+ if kind == 'path-too-long':
+ # A dependency folder Git cannot read is named, above the same next step.
+ found = re.search(r'The path of the dependency folder (.+?) is too long for Git to read', text)
+ if found:
+ detail = ('文件夹:%s' if zh else 'Folder: %s') % found[1]
+ return dict(title=title[zh], detail=detail + '\n' + action[zh], action='', kind=kind)
return dict(title=title[zh], detail=detail, action=action[zh], kind=kind)
# Validation messages are already actionable. Show the cause, not a stack
# trace or a guessed hardware diagnosis, and leave long details expandable.
diff --git a/freevideo_engine/network.py b/freevideo_engine/network.py
index 369186f..cb811ca 100644
--- a/freevideo_engine/network.py
+++ b/freevideo_engine/network.py
@@ -1531,6 +1531,23 @@ def mismatch_message(target, git, env, head, commit, dirty):
% (target, ' '.join(details)))
+# Git reads a checkout's settings from .git\config by its ordinary path, even in
+# the deep-folder branch above. Past the path limit it cannot tell whether
+# FreeVideo made the folder, and a new copy in the same place could not be read
+# either, so such a folder is reported before anything is renamed.
+GIT_SETTINGS_SUFFIX = '\\.git\\config'
+
+
+def git_settings_out_of_reach(path):
+ return is_windows() and path_chars(plain(path)) + len(GIT_SETTINGS_SUFFIX) > GIT_PATH_LIMIT
+
+
+def path_too_long_message(target):
+ return ('The path of the dependency folder %s is too long for Git to read. Install FreeVideo in a folder '
+ 'with a shorter path, such as D:\\FreeVideo, then click "Retry installation". '
+ 'The folder was left unchanged.' % plain(target))
+
+
REPLACED_MARKER = 'freevideo-replaced'
@@ -1592,6 +1609,8 @@ def clone(target, url, commit, *, sparse=None, run=None, network=None, env=None)
head, dirty = None, '' # Git cannot read it as a repository of its own.
if head == commit and not dirty:
return target
+ if target.parent.name == 'vendor' and git_settings_out_of_reach(target):
+ raise ValueError(path_too_long_message(target))
if not owned_checkout(target, url, sparse, git, env):
raise ValueError(mismatch_message(target, git, env, head, commit, dirty))
replacing = True