Skip to content

Commit

Permalink
Include different delimiter for Date (#3415)
Browse files Browse the repository at this point in the history
* Include different delimiter for Date

* Properly format expression

Co-authored-by: Brandon Waterloo [MSFT] <[email protected]>

Co-authored-by: Brandon Waterloo [MSFT] <[email protected]>
  • Loading branch information
left-code and bwateratmsft authored Feb 8, 2022
1 parent 835b458 commit c0ae3e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/docker/files/ContainerFilesUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function parseWindowsType(dirOrSize: string): DirectoryItemType {
}

function parseWindowsDirectoryItems(input: string, parentPath: string): DirectoryItem[] {
const expression = /^(?<date>\d{1,2}\/\d{1,2}\/\d{4})\s+(?<time>\d{1,2}:\d{1,2}( (AM|PM))?)\s+(?<dirOrSize><DIR>|<SYMLINKD>|\d+)\s+(?<name>.*)$/gm;
const expression = /^(?<date>\d{1,2}(\/|\.)\d{1,2}(\/|\.)\d{4})\s+(?<time>\d{1,2}:\d{1,2}( (AM|PM))?)\s+(?<dirOrSize><DIR>|<SYMLINKD>|\d+)\s+(?<name>.*)$/gm;

let match = expression.exec(input);

Expand Down

0 comments on commit c0ae3e2

Please sign in to comment.