I just found out today that if you call SaveFileRequester with a long file name, the requester isn't shown, the program just skips past the command as though it wasn't even there. My request is, could a check be done to ensure the requester isn't ignored, or do we have to check the length of every filename passed to it? I know this issue is probably due to #MAX_LEN path sizes, but it's a problem:
Code: Select all
file$="C:\Test"+Space(300)+"File.txt"
SaveFileRequester("Save file",f$,"",0) ; Never shown!
What this command currently needs to be 100% safe in all situations (just an example):
Code: Select all
file$="C:\Test"+Space(300)+"File.txt"
f$=GetFilePart(file$) : If Len(f$)>100 : f$=Left(f$,100) : EndIf
SaveFileRequester("Save file",GetPathPart(file$)+f$,"",0)
It's bad that we need to do a Len() check and Left() crop before every use of SaveFileRequester(). BTW, the filenames were obtained by parsing a text file of a list, so yes, the checks and crops ARE needed.