mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Modified some FileSystem APIs as per the review documents.
This commit is contained in:
@ -349,7 +349,8 @@ export class FileSystemAccess {
|
||||
private getFileExtension(path: string): string {
|
||||
var dotIndex = path.lastIndexOf(".");
|
||||
if (dotIndex && dotIndex >= 0 && dotIndex < path.length) {
|
||||
return path.substring(dotIndex);
|
||||
// return the extension without the "." (like in iOS)
|
||||
return path.substring(dotIndex + 1);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
|
Reference in New Issue
Block a user