2
0
Эх сурвалжийг харах

ADD: Don't allow rename file to the name with a dot at the end (Windows)

Alexander Koblov 3 жил өмнө
parent
commit
811266e6c3

+ 3 - 1
src/filesources/filesystem/ufilesystemsetfilepropertyoperation.pas

@@ -330,7 +330,9 @@ begin
   OldName:= aFile.FullPath;
 
   if FileSource.GetPathType(NewName) <> ptAbsolute then
-    NewName := ExtractFilePath(OldName) + NewName;
+  begin
+    NewName := ExtractFilePath(OldName) + TrimPath(NewName);
+  end;
 
   if OldName = NewName then
     Exit(sfprSkipped);