From e2ec557eec1ad49175fb89931cd570399fc1ad24 Mon Sep 17 00:00:00 2001 From: Eric Doughty-Papassideris Date: Fri, 27 Sep 2024 12:18:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20front:=20trim=20filename=20befor?= =?UTF-8?q?e=20rename=20operation=20(fixes=20#660)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/views/client/body/drive/modals/properties/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrive/frontend/src/app/views/client/body/drive/modals/properties/index.tsx b/tdrive/frontend/src/app/views/client/body/drive/modals/properties/index.tsx index 3272ef9f..45661e68 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/modals/properties/index.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/modals/properties/index.tsx @@ -62,7 +62,7 @@ const PropertiesModalContent = ({ id, onClose }: { id: string; onClose: () => vo const doSave = async () => { setLoading(true); if (item) { - let finalName = name; + let finalName = (name || '').trim(); //TODO: Confirm rename if extension changed ? if (!item?.is_directory) { //TODO: Why do we trim extensions on folders ?