Re: getstyle cannot create target file

Alexandru Lazar <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
I'm piggybacking on my own message: is there any (historical, I presume) 
reason why, when packing a theme, getstyle relocates files with their 
whole path? I.e. from /long/path/to/file.png to 
themeDir/long/path/to/file.png?

It seems to me that a much cleaner solution is to relocate 
/long/path/to/file.png to themeDir/assets/file.png. The only problem 
this seems to have is that a theme creator may use files with the same 
name, but located in different places, and getstyle would either have to 
rename these automatically (not too difficult) or bork and warn the user 
(trivial, but possibly annoying to use).

Fixing the code as it is now would require implementing an equivalent to 
mkdir -p, which is a rather unpleasant exercise in POSIX programming; 
relocating things to themeDir/assets/ requires about 1/10th of the code 
of an ersatz mkdir -p (i.e. a trivial mkdir() + a "get file name from 
this absolute path" function).

So I'm going to amend makeThemePack to do the latter, but I wanted to 
announce my intention to do so in advance, in case anyone more familiar 
with WMaker's codebase has relevant thoughts. This looks like a pretty 
obvious thing to do, so I thought I'd ask if I'm not missing something 
before doing something Really Really Smart on twenty year-old code

Alex


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.