From c78529b04028c1f0f05cd90e7fd596bd9dfbaee4 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Mon, 26 Jul 2021 16:41:55 +0200 Subject: [PATCH] bugfix: get name pipe --- src/util/pipes/getFilename.pipe.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/pipes/getFilename.pipe.ts b/src/util/pipes/getFilename.pipe.ts index 41469ab43..9f91f7652 100644 --- a/src/util/pipes/getFilename.pipe.ts +++ b/src/util/pipes/getFilename.pipe.ts @@ -5,7 +5,7 @@ import { Pipe, PipeTransform } from "@angular/core"; }) export class GetFilenamePipe implements PipeTransform { - private regex: RegExp = new RegExp('[\\/\\\\]([\\w\\.]*?)$') + private regex: RegExp = new RegExp('\/([^\/]+)$') public transform(fullname: string): string { return this.regex.test(fullname) ? this.regex.exec(fullname)[1] -- GitLab