[pve-devel] [RFC manager] Display subdirs when listing storage content

Dominic Jäger d.jaeger at proxmox.com
Thu Feb 13 11:53:02 CET 2020


On Thu, Feb 13, 2020 at 09:12:24AM +0100, Thomas Lamprecht wrote:
> On 12/2/19 12:45 PM, Dominic Jäger wrote:
> > -	return data.volid.replace(/^.*:(.*\/)?/,'');
> > +	return data.volid.replace(/^.*:[^\/]*\//,'');
> 
> what if a volid does not contain any slash? Previously we could cope with none or
> the first one, not with any amount but not none, or? Maybe something like (untested):
> 
> return data.volid.replace(/^.*:([^\/]*\/)?/,'');

I missed that. My regex made the GUI display for example
"local-lvm:vm-100-disk-0" instead of only "vm-100-disk-0". Your proposed fix
works.




More information about the pve-devel mailing list