Re: [hatari-devel] Problems with trailing backslash in path names (was: Problems with files greater 2 GiB)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


This remindes me of a recent change in the upcoming JDK 25:

"
File operations with directory or file names ending in a space now consistently fail on Windows (JDK-8354450)
core-libs/java.io

File operations on a path with a trailing space in a directory or file name, e.g. "C:SomeFolderSomeFile ", now fail consistently on Windows. For example. File::mkdir will return false, or File::createNewFile will throw IOException if an element in the path has a trailing space. Such pathnames are not legal on Windows. Prior to JDK 25, operations on a File created from such an illegal abstract pathname could appear to succeed when in fact they did not.
"

This is the same issue, isn't it?

Best regards

Uwe

> 
> 
> > Am 29.06.2025 um 13:39 schrieb Thomas Huth <th.huth@xxxxxxxxx>:
> > 
> > Am Sun, 29 Jun 2025 08:19:39 +0200
> > schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
> > 
> >> Large file support seems to work for Windows users. Thanks again!
> >> 
> >> But there seems to be a new issue when enabling large file support: Some functions like stat() on Windows do no longer work with path names containing a trailing backslash. They did before enabling large file support. Do you experience the same on Hatari?
> > 
> > So far I'm not aware of any complaints yet.
> > 
> > Thomas
> > 
> 
> After more testing I can confirm that when enabling large file support on Windows there is a big problem with path strings ending with a backslash. Obviously stat() will reliably fail if the path parameter contains a trailing backslash. The backslash is interpreted as an escape character. This will for example cause File_DirExists() to fail. This is of course not the only failure.
> 
> I think this needs to be fixed in the GUI code (for some reason it adds trailing backslashes to all path strings). That should be done before the next release (2.6.1) as this is a severe bug.
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/