fix(android): file system normalizePath (#10077)

This commit is contained in:
farfromrefuge
2022-11-07 02:17:42 +00:00
committed by GitHub
parent 608d3b9296
commit 497a9dbaea

View File

@ -581,9 +581,9 @@ export class FileSystemAccess implements IFileSystemAccess {
} }
public normalizePath(path: string): string { public normalizePath(path: string): string {
const file = new java.io.File(path); // the [''] is a trick to not have to create a android.net.URI
// and use the method with string signature
return file.getAbsolutePath(); return java.nio.file.Paths.get(path, ['']).normalize().toString();
} }
public joinPath(left: string, right: string): string { public joinPath(left: string, right: string): string {