From a16f996fd9a0c1f54198c32aab63c89f241a4c7f Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Mon, 17 Feb 2025 17:14:02 +0100 Subject: [PATCH] IONOS(file-utils): preserve numeric names for filename and basename as string Signed-off-by: Misha M.-Kupriyanov --- src/utils/fileUtils.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 11c2b7a35..75c3bfa77 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -104,6 +104,11 @@ const genFileInfo = function(obj: FileStat): FileInfo { } else if (data === 'true') { fileInfo[camelcase(key)] = true } else { + // preserve numeric names for filename and basename as string + if (key === 'filename' || key === 'basename') { + fileInfo[camelcase(key)] = data + return + } fileInfo[camelcase(key)] = isNumber(data) ? Number(data) : data