Page 1 of 1

expected with GetPathPart()?

Posted: Sat Apr 27, 2024 3:39 am
by jassing
Is it expected that "getpathpart()" sort of validates the path?
Given:

Code: Select all

test$ = "c:\temp\dowload|\check\test|.txt"
Debug GetFilePart(test$) ; is  test|.txt
Debug GetPathPart(test$) ; is  c:\temp\
I wanted to get the "invalid" full path to try to correct it, but purebasic truncates the path.
Purebasic does not do this with getfilepart(), so at best it's an inconsistency.

Continuing:

Code: Select all

Debug FileSize("c:\temp\download*\")
Debug FileSize("c:\temp\download?\")
This should not be true...

Re: expected with GetPathPart()?

Posted: Sat Apr 27, 2024 3:58 am
by AZJIO

Code: Select all

CheckFilename(Filename$)
FileSize(Filename$)