mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Add global permission request system with centralized context and dialog
This commit is contained in:
1 parent
6ce3548dfe
commit
e3a3cbde84
12 files changed
+371
-45
No files matched your search
@@ -233,7 +233,8 @@ export async function renameOrMoveFile(userPath: string, body: { newPath: string
|
||||
}
|
||||
|
||||
function validatePath(userPath: string): string {
|
||||
const normalized = path.normalize(userPath).replace(/^(\.\.(\/|\\|$))+/, '')
|
||||
const trimmed = userPath.trim()
|
||||
const normalized = path.normalize(trimmed).replace(/^(\.\.(\/|\\|$))+/, '')
|
||||
const fullPath = path.join(SHARED_WORKSPACE_BASE, normalized)
|
||||
const resolved = path.resolve(fullPath)
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ export async function initLocalRepo(
|
||||
localPath: string,
|
||||
branch?: string
|
||||
): Promise<Repo> {
|
||||
const normalizedPath = localPath.replace(/\/+$/, '')
|
||||
const normalizedPath = localPath.trim().replace(/\/+$/, '')
|
||||
const fullPath = path.resolve(getReposPath(), normalizedPath)
|
||||
|
||||
const existing = db.getRepoByLocalPath(database, normalizedPath)
|
||||
|
||||
Reference in new issue
Block a user