getstyle: fix wcopy_file paths
commitb7a1528833cf1abbe33067570f4f0d4a09f80ebc
authorAlexandru Lazar <alazar@startmail.com>
Wed, 20 Apr 2016 18:21:33 +0000 (20 21:21 +0300)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 24 Apr 2016 23:11:08 +0000 (24 19:11 -0400)
treec14b8d607e3ca31b7de355cccc8dc841dc87dc49
parent2ea61626296de392b4f72468d294bc62bf05fc9c
getstyle: fix wcopy_file paths

Some (presumably stale) calls to wcopy_file used what appears to
be an incorrect destination which did not always exist. This patch
forces assets to be copied under <themedir>/<asset>, rather than
<themedir><absolute path of asset>. It works by first getting the
"new" path (i.e. the one that will be inserted in the property
list), which is relative to <themedir> (and appears to be always
in the root directory, too); it then copies the file to that path.

This *may* have been the original intended behaviour, as the one
it replaces clutters the path and leaks configuration data. In
addition, the style file seems to store only the file's name, not
the path relative to <themedir>, even when the file is copied with
its full hierarchy.

Signed-off-by: Alexandru Lazar <alazar@startmail.com>
util/getstyle.c