Ver código fonte

Capitalize the drive letter in windows absolute paths (#727)

David Kincaid 11 meses atrás
pai
commit
658270e742
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      src/utils/project_utils.ts

+ 4 - 0
src/utils/project_utils.ts

@@ -33,6 +33,10 @@ export async function get_project_dir(): Promise<string | undefined> {
 	}
 	projectFile = file;
 	projectDir = path.dirname(file);
+    if (os.platform() === "win32") {
+        // capitalize the drive letter in windows absolute paths
+        projectDir = projectDir[0].toUpperCase() + projectDir.slice(1);
+    }
 	return projectDir;
 }