Fix possible OOB read with empty path

4 jobs for master in 2 minutes and 1 second (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #268541
amd64 debian
build-debian

00:00:50

passed #268542
macos
build-macos

00:01:09

passed #268544
win32 amd64 debian
build-win32

00:01:54

passed #268543
win64 amd64 debian
build-win64

00:02:01