expected with GetPathPart()?

Just starting out? Need help? Post your questions and find answers here.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

expected with GetPathPart()?

Post 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...
AZJIO
Addict
Addict
Posts: 2225
Joined: Sun May 14, 2017 1:48 am

Re: expected with GetPathPart()?

Post by AZJIO »

Code: Select all

CheckFilename(Filename$)
FileSize(Filename$)
Post Reply