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. _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel