@directivegames/genesys.sdk 3.3.11 → 3.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,7 +116,10 @@ export const handlers = {
|
|
|
116
116
|
return res;
|
|
117
117
|
},
|
|
118
118
|
deleteProject: async (projectPath) => {
|
|
119
|
-
|
|
119
|
+
try {
|
|
120
|
+
await fs.promises.access(projectPath);
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
120
123
|
return {
|
|
121
124
|
success: false,
|
|
122
125
|
message: 'Project not found',
|
|
@@ -126,11 +129,7 @@ export const handlers = {
|
|
|
126
129
|
handlers.ui.showLoadingOverlay('Deleting Project...');
|
|
127
130
|
try {
|
|
128
131
|
const { folder: projectFolder } = getProjectFolderAndFile(projectPath, logger);
|
|
129
|
-
|
|
130
|
-
for (const entry of entries) {
|
|
131
|
-
const fullPath = pathlib.join(projectFolder, entry.name);
|
|
132
|
-
fs.rmSync(fullPath, { recursive: true, force: true });
|
|
133
|
-
}
|
|
132
|
+
await fs.promises.rm(projectFolder, { recursive: true, force: true });
|
|
134
133
|
// Remove the project from the projects list
|
|
135
134
|
appState.removeProject(projectPath);
|
|
136
135
|
return {
|