getstyle cannot create target file
Alexandru Lazar <[email protected]>
| Newsgroups | gmane.compw.window-managers.windowmaker.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi everyone, I just tried to pack up a theme file using getstyle. I tested this on wmaker 0.95.7 (the version I first found it on, on an Arch Linux box), but it seems to happen on -next as well (I just cloned the git repo and tried it again). Running: $ getstyle -p test results in this error output: WINGs(wcopy_file(findfile.c:457)): error: Could not create target file "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/absinthe_tile.png": No such file or directory WINGs(wcopy_file(findfile.c:457)): error: Could not create target file "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Backgrounds/GreenFairy.png": No such file or directory A (correct) style file seems to be created in /home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed/ , but nothing else. I fired up GDB and traced this to a call to wcopy_file. The problem seems to be in this call on line 453: fd_dst = open(path_dst, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); where path_dst is set to $2 = 0x60b8c0 "/home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/absinthe_tile.png" but the path /home/alazar/GNUstep/Library/WindowMaker/Themes/test.themed//home/alazar/GNUstep/Library/WindowMaker/Pixmaps/ does not exist (I can't examine errno in the GDB session, but I suspect it's set to ENOENT based on the output of werror). I have a few questions: 1. Am I doing anything wrong here, or is this a legit bug? 2. If it's a legit bug, would you like a patch? I'm not too familiar with the WindowMaker codebase so it might take a while, but fixing something in util/ looks like a good way to get the hang of it (and the fix doesn't seem to require anything too wmaker-specific). 3. If there is interest in a patch, should I also look into making getstyle a little less naive with paths? I was never curious enough to look into a .themed, but from the looks of it, getstyle -p is trying to copy all theme assets under <output>.themed in locations of the form <output>.themed/<absolute-path-of-asset>. It makes sense but the resulting pathnames are large (and the theme becomes hard to modify post-packing) and it exposes things like the creator's username to the Internet (unlikely to be a problem, but it makes me a little uncomfortable nonetheless...) Thanks! Alexandru Lazar -- To unsubscribe, send mail to [email protected].