mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
added comment
This commit is contained in:
parent
dd104c178a
commit
7bffb0f623
@ -708,6 +708,9 @@ BARS.defineActions(function() {
|
||||
let projectVerRegex = /([0-9]+).bbmodel/gm;
|
||||
let projectVerMatch = projectVerRegex.exec(Project.save_path);
|
||||
|
||||
// Check if project file has version patterns in it (right before ".bbmodel")
|
||||
// if it does, grab & increment it
|
||||
// if it doesn't, add it
|
||||
if (projectVerMatch) {
|
||||
let projectVer = parseInt(projectVerMatch[1]); // Parse & store project ver int (capturing group 1)
|
||||
codec.write(codec.compile(), Project.save_path.replace(projectVerRegex, `${projectVer + 1}.bbmodel`));
|
||||
|
Loading…
Reference in New Issue
Block a user