In Windows the file path separator character is \ not /. Currently when parsing a config location ending with \ in windows as it should for a folder, an exception is raised complaining it does not end with '/'.

Fix: Add File.separator as valid suffix for directory detection

Comment From: mederel

Trying to see what the build failure is, but my browser gets stuck at loading the data...

Comment From: snicoll

@mederel thanks for the follow-up but given the change is small, we can review that build error as part of reviewing if it is related.

Comment From: snicoll

There is also a dedicated note in the reference guide we'd have to update if we decide to pursue with this change.

Comment From: philwebb

We should also update the reference docs

Comment From: philwebb

@mederel Thanks very much for making your first contribution to Spring Boot. This has now been merged to master and will be in Spring Boot 2.5.