Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 3:50 PM Bart wrote: Thanks again for testing. What about ['c:','a','b'] Does it return c:a\b, or c:\a\b (on Windows), or IOW: does it take into account driveletters? The first one IMO would be correct. It returns c:

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 2:31 PM Michael Van Canneyt via fpc-pascal wrote: > This raises the question what the result of > TPath.Combine(['a','\b',c'','\d','e']) would be (I would then expect > either \b\c or \d\e)? \d\e > > If ValidateParam

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
Put a new implementation in the bugreport. Did not test the "wah is an illegal chatacter", IMO that should be a seperate issue. Currently based upon these rules: { Concatenates the paths. If one or more of the paths is absolute, it will use the right most absolute path as base path and then

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
On Sun, Nov 19, 2023 at 3:50 PM Bart wrote: > Thanks again for testing. What about ['c:','a','b'] Does it return c:a\b, or c:\a\b (on Windows), or IOW: does it take into account driveletters? The first one IMO would be correct. -- Bart ___ fpc-pascal

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Bart via fpc-pascal
On Sun, Nov 19, 2023 at 2:31 PM Michael Van Canneyt via fpc-pascal wrote: > > This raises the question what the result of > > TPath.Combine(['a','\b',c'','\d','e']) would be (I would then expect > > either \b\c or \d\e)? > > \d\e > > > > > If ValidateParams is True, will it raise an error on inv

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?y

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 12:59 PM Michael Van Canneyt via fpc-pascal wrote: The output is in linux.txt and windows.txt Thanks for testing. It seems that it'll pick the last absolute path it finds, not the first one in the argument list. It

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Bart via fpc-pascal
On Sun, Nov 19, 2023 at 12:59 PM Michael Van Canneyt via fpc-pascal wrote: > The output is in linux.txt and windows.txt Thanks for testing. It seems that it'll pick the last absolute path it finds, not the first one in the argument list. It seems that DoTest('regular 1','a','\b','c'); will giv

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Bart via fpc-pascal wrote: On Sun, Nov 19, 2023 at 11:04 AM Sven Barth via fpc-pascal wrote: Also: does this depend on the operating system and/or file system? Cause Linux file systems have different invalid characters (usually only slash and NUL) than NTFS or FAT.

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Michael Van Canneyt via fpc-pascal
On Sun, 19 Nov 2023, Sven Barth via fpc-pascal wrote: Bart via fpc-pascal schrieb am Sa., 18. Nov. 2023, 18:24: 1. The docs state that an exception is raised if the given paths contain invalid characters. Does the vlaue of the ValidateParams have any influence on this? Also: does this de

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Bart via fpc-pascal
On Sun, Nov 19, 2023 at 11:04 AM Sven Barth via fpc-pascal wrote: > Also: does this depend on the operating system and/or file system? Cause > Linux file systems have different invalid characters (usually only slash and > NUL) than NTFS or FAT. Determining FileSystem at runtime, is that even

Re: [fpc-pascal] TPath enhancements (Issue #40513): can somebody test with Delphi 12?

2023-11-19 Thread Sven Barth via fpc-pascal
Bart via fpc-pascal schrieb am Sa., 18. Nov. 2023, 18:24: > 1. The docs state that an exception is raised if the given paths > contain invalid characters. Does the vlaue of the ValidateParams have > any influence on this? > Also: does this depend on the operating system and/or file system? Cause