From bd13c49ff77a1d61d5b71483213b01afa262958c Mon Sep 17 00:00:00 2001 From: "Robert S. French" Date: Thu, 7 Jan 1988 07:35:22 +0000 Subject: Fixed writing variables problem when no write access to homedir --- lib/ZVariables.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/ZVariables.c') diff --git a/lib/ZVariables.c b/lib/ZVariables.c index 39ba81c..36f3bef 100644 --- a/lib/ZVariables.c +++ b/lib/ZVariables.c @@ -57,10 +57,8 @@ Code_t ZSetVariable(var,value) strcpy(varfilebackup,varfile); strcat(varfilebackup,".backup"); - if (!(fpout = fopen(varfilebackup,"w"))) { - fclose(fpin); + if (!(fpout = fopen(varfilebackup,"w"))) return (errno); - } if (fpin = fopen(varfile,"r")) { while (fgets(varbfr,sizeof varbfr,fpin) > 0) { if (varbfr[strlen(varbfr)-1] < ' ') -- cgit v1.2.3