fix: correctly generate remoteFileId for paths without a leading slash

This commit is contained in:
James Murdza 2024-12-09 13:59:41 -08:00
parent 6a60f4d286
commit 093a4e9758

View File

@ -92,7 +92,11 @@ export class FileManager {
// Convert local file path to remote path // Convert local file path to remote path
private getRemoteFileId(localId: string): string { private getRemoteFileId(localId: string): string {
return `projects/${this.sandboxId}${localId}` return [
"projects",
this.sandboxId,
localId.startsWith("/") ? localId : localId,
].join("/")
} }
// Convert remote file path to local file path // Convert remote file path to local file path