mirror of
https://github.com/Leo501/CocosCreatorTutorial.git
synced 2026-05-07 22:27:22 +08:00
优化main.js中有高版本覆盖安装时,把低版本的cache清除
This commit is contained in:
@@ -24,7 +24,12 @@
|
||||
}
|
||||
//版本比最近版本等于or大于。需要清理热更新cache;
|
||||
if (versionCompareHandle(version, curVersion) >= 0) {
|
||||
hotUpdateSearchPaths && jsb.fileUtils.removeDirectory(hotUpdateSearchPaths);
|
||||
if (hotUpdateSearchPaths) {
|
||||
let list = JSON.parse(hotUpdateSearchPaths);
|
||||
list.forEach((path) => {
|
||||
jsb.fileUtils.removeDirectory(path);
|
||||
});
|
||||
}
|
||||
}
|
||||
//设置搜索路径
|
||||
if (window.cc && cc.sys.isNative) {
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
}
|
||||
//版本比最近版本等于or大于。需要清理热更新cache;
|
||||
if (versionCompareHandle(version, curVersion) >= 0) {
|
||||
hotUpdateSearchPaths && jsb.fileUtils.removeDirectory(hotUpdateSearchPaths);
|
||||
if (hotUpdateSearchPaths) {
|
||||
let list = JSON.parse(hotUpdateSearchPaths);
|
||||
list.forEach((path) => {
|
||||
jsb.fileUtils.removeDirectory(path);
|
||||
});
|
||||
}
|
||||
}
|
||||
//设置搜索路径
|
||||
if (window.cc && cc.sys.isNative) {
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
}
|
||||
//版本比最近版本等于or大于。需要清理热更新cache;
|
||||
if (versionCompareHandle(version, curVersion) >= 0) {
|
||||
hotUpdateSearchPaths && jsb.fileUtils.removeDirectory(hotUpdateSearchPaths);
|
||||
if (hotUpdateSearchPaths) {
|
||||
let list = JSON.parse(hotUpdateSearchPaths);
|
||||
list.forEach((path) => {
|
||||
jsb.fileUtils.removeDirectory(path);
|
||||
});
|
||||
}
|
||||
}
|
||||
//设置搜索路径
|
||||
if (window.cc && cc.sys.isNative) {
|
||||
|
||||
Reference in New Issue
Block a user