1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-28 19:05:51 +01:00

Use wuserdatapath() everytime it is applicable

Replace calls to wusergnusteppath() which just append "/Library" by calls
to wuserdatapath().
Take opportunity to replace hardcoded "/WindowMaker" directories with
the existing PACKAGE_TARNAME macro (which comes from autotools).

The choice of 'TARNAME' is because it meant to be used in filename, thus
less likely to have problematic characters than PACKAGE_NAME (meant for
display purpose) and PACKAGE which is there for historical reason.
This commit is contained in:
John D Pell
2021-08-08 09:36:18 +02:00
committed by Carlos R. Mafra
parent 1e45ff2305
commit bd38778bef
6 changed files with 16 additions and 18 deletions

View File

@@ -650,7 +650,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
umask(permissions);
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
path = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
path = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart");
f = fopen(path, "rb");
if (!f) {
@@ -668,7 +668,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
char *tmppath;
FILE *fo;
tmppath = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
tmppath = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart.tmp");
fo = fopen(tmppath, "wb");
if (!fo) {
werror(_("could not create temporary file %s"), tmppath);