diff --git a/server/projects.js b/server/projects.js index b4606f8..475b323 100755 --- a/server/projects.js +++ b/server/projects.js @@ -1095,7 +1095,7 @@ async function addProjectManually(projectPath, displayName = null) { } // Generate project name (encode path for use as directory name) - const projectName = absolutePath.replace(/\//g, '-'); + const projectName = absolutePath.replace(/[\\/:\s~_]/g, '-'); // Check if project already exists in config const config = await loadProjectConfig(); diff --git a/server/routes/projects.js b/server/routes/projects.js index 863fd7f..4208f7b 100644 --- a/server/routes/projects.js +++ b/server/routes/projects.js @@ -353,7 +353,7 @@ router.get('/clone-progress', async (req, res) => { let githubToken = null; if (githubTokenId) { - const token = await getGithubTokenById(parseInt(githubTokenId), req.user?.id); + const token = await getGithubTokenById(parseInt(githubTokenId), req.user.id); if (token) { githubToken = token.github_token; }