Skip to content

Commit 9ef9d8f

Browse files
authored
Check extension before setting title
1 parent 9ec118e commit 9ef9d8f

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/main/index.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ const createMainWindow = () => {
9494
const userChosenPath = dialog.showSaveDialog(window, options);
9595
if (userChosenPath) {
9696
item.setSavePath(userChosenPath);
97-
const newProjectTitle = path.basename(userChosenPath, extName);
98-
webContents.send('setTitleFromSave', {title: newProjectTitle});
99-
100-
// "setTitleFromSave" will set the project title but GUI has already reported the telemetry event
101-
// using the old title. This call lets the telemetry client know that the save was actually completed
102-
// and the event should be committed to the event queue with this new title.
103-
telemetry.projectSaveCompleted(newProjectTitle);
97+
if (extNameNoDot.toUpperCase() == "SB3") { // when a project is downloaded, not an asset
98+
const newProjectTitle = path.basename(userChosenPath, extName);
99+
webContents.send('setTitleFromSave', {title: newProjectTitle});
100+
101+
// "setTitleFromSave" will set the project title but GUI has already reported the telemetry event
102+
// using the old title. This call lets the telemetry client know that the save was actually completed
103+
// and the event should be committed to the event queue with this new title.
104+
telemetry.projectSaveCompleted(newProjectTitle);
105+
}
104106
} else {
105107
item.cancel();
106108
telemetry.projectSaveCanceled();

0 commit comments

Comments
 (0)