diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts index f3a8f4e51..debe280ea 100644 --- a/app/src/util/pathName.ts +++ b/app/src/util/pathName.ts @@ -80,7 +80,7 @@ export const getDisplayName = (filePath: string, basename = true, removeSY = fal }; export const getAssetName = (assetPath: string) => { - return assetPath.substring(7, assetPath.length - pathPosix().extname(assetPath).length - 23); + return assetPath.replace(/-\d{14}-\w{7}/, "").replace(pathPosix().extname(assetPath), "").replace("assets/", ""); }; export const isLocalPath = (link: string) => {