MCPcopy Create free account
hub / github.com/Crain99/cc-reverse / validatePaths

Function validatePaths

src/core/reverseEngine.js:344–356  ·  view source on GitHub ↗

* 验证路径是否存在 * @param {string} resPath 资源路径 * @param {string} settingsPath 设置文件路径 * @param {string} projectPath 项目文件路径

(resPath, settingsPath, projectPath)

Source from the content-addressed store, hash-verified

342
343 // Version hint: 3.x → bundle pipeline
344 if (versionHint === '3.x') {
345 for (const root of uniqueCandidateRoots) {
346 if (isBundleRoot(root)) {
347 logger.info('使用用户指定的Cocos Creator 3.x项目结构');
348 return { version: '3.x', sourcePath: root };
349 }
350 }
351 logger.warn('用户指定3.x版本,但未找到对应文件结构,尝试自动检测...');
352 }
353
354 // Version hint: 2.4.x
355 // Prefer bundle layout when present (MD5 Cache / 2.4 bundle builds). Forcing
356 // the classic 2.x pipeline on those projects yields JSON "textures" and fails
357 // to parse config.<hash>.json — the root cause of issue #31.
358 if (versionHint === '2.4.x') {
359 for (const root of uniqueCandidateRoots) {

Callers 1

reverseProjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected