1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-29 11:56:15 +02:00

dsv/dsv (flush): sanitize name of local data sheet copy

We turn ? (and, for good measure, & as well) into _, to be compatible with
the open_generic function of xdg-open, which strips \?*.
This commit is contained in:
Werner Almesberger 2016-02-29 22:44:26 -03:00
parent e291c43348
commit 006940d58b

View File

@ -2,8 +2,8 @@
#
# dsv - Improved data sheet viewer
#
# Written 2010-2014 by Werner Almesberger
# Copyright 2010-2014 Werner Almesberger
# Written 2010-2014, 2016 by Werner Almesberger
# Copyright 2010-2014, 2016 Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -65,7 +65,7 @@ flush()
echo "$nm: no URL" 1>&2
exit 1
fi
ds=$nm-`basename "$url"`
ds=$nm-`basename "$url" | tr '?&' _`
mkdir -p $DSV_DIR
if [ ! -r "$DSV_DIR/$ds" ]; then
if [ "$zip" ]; then