Re: [PATCH] gdb: check for empty strings in get_standard_cache_dir/get_standard_config_dir

Lancelot SIX via Gdb-patches
2021-01-07T22:05:04Z

> What's annoying though is that glob won't work with non-existent directories.
> So if I use
>
> /home/smarchi/my/non/existent/directory
>
> it is accepted, and these directories will be created. But I set
>
> ~/my/non/existent/directory
>
> gdb_tilde_expand will fail. Perhaps it's just a limitation of gdb_tilde_expand,
> and it should be changed to use something else than glob(3) in order to support
> non-existent paths.
>
> Simon

Using glob just to expand the first path component should do the trick
quite easily.

I’ll have a look into it to update gdb_tilde_expand (unless someone does
it before me).

Lancelot