mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
parent
099fcd9b10
commit
58fc08840a
@ -140,10 +140,13 @@ export class PlatformTools {
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalizes given path. Does "path.normalize".
|
||||
* Normalizes given path. Does "path.normalize" and replaces backslashes with forward slashes on Windows.
|
||||
*/
|
||||
static pathNormalize(pathStr: string): string {
|
||||
return path.normalize(pathStr)
|
||||
let normalizedPath = path.normalize(pathStr)
|
||||
if (process.platform === "win32")
|
||||
normalizedPath = normalizedPath.replace(/\\/g, "/")
|
||||
return normalizedPath
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user