mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix absolute paths being prioritized when when merging projects
This commit is contained in:
parent
8d89a18341
commit
22b0d8e118
@ -526,10 +526,6 @@ var codec = new Codec('project', {
|
||||
c++;
|
||||
tex_copy.id = c.toString();
|
||||
}
|
||||
if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) {
|
||||
tex_copy.loadContentFromPath(tex.path)
|
||||
return tex_copy;
|
||||
}
|
||||
if (isApp && tex.relative_path && path) {
|
||||
let resolved_path = PathModule.resolve(PathModule.dirname(path), tex.relative_path);
|
||||
if (fs.existsSync(resolved_path)) {
|
||||
@ -537,6 +533,10 @@ var codec = new Codec('project', {
|
||||
return tex_copy;
|
||||
}
|
||||
}
|
||||
if (isApp && tex.path && fs.existsSync(tex.path) && !model.meta.backup) {
|
||||
tex_copy.loadContentFromPath(tex.path)
|
||||
return tex_copy;
|
||||
}
|
||||
if (tex.source && tex.source.substr(0, 5) == 'data:') {
|
||||
tex_copy.fromDataURL(tex.source)
|
||||
return tex_copy;
|
||||
|
Loading…
Reference in New Issue
Block a user