From a63462d0dc3039fc31cc82ecf09e68b55361a5f4 Mon Sep 17 00:00:00 2001 From: WhiteMind Date: Fri, 26 Apr 2024 18:16:20 +0800 Subject: [PATCH] fix: windows path rules --- packages/manager/package.json | 2 +- packages/manager/src/manager.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index d749810..c40927a 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -1,6 +1,6 @@ { "name": "@autorecord/manager", - "version": "1.1.0", + "version": "1.1.1", "description": "Batch scheduling recorders", "main": "./lib/index.js", "publishConfig": { diff --git a/packages/manager/src/manager.ts b/packages/manager/src/manager.ts index e69ddbc..d994269 100644 --- a/packages/manager/src/manager.ts +++ b/packages/manager/src/manager.ts @@ -292,7 +292,7 @@ function removeSystemReservedChars(filename: string) { if (process.platform !== 'win32') return filename // Refs: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions - return filename.replace(/[\\/:*?"<>|]/g, '') + return filename.replace(/[\\/:*?"<>|]/g, '').replace(/[ .]+$/, '') } export type GetProviderExtra

= P extends RecorderProvider ? E : never