blob: b7a351ef63f6299f2339117188756bbc268aa653 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
$NetBSD: patch-aa,v 1.4 2000/11/23 22:05:44 tron Exp $
--- ee_conf.c.orig Wed Feb 10 15:38:55 1999
+++ ee_conf.c Thu Nov 23 23:02:06 2000
@@ -10,6 +10,9 @@
#include <ee_image.h>
#include <stdio.h>
#include <stdlib.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include "globals.h"
#include "functions.h"
@@ -25,13 +28,26 @@
gchar *hom;
gchar *s;
FILE *f;
+ struct stat sb;
+ int i;
hom = homedir(getuid());
if (!hom)
return;
+ s = g_strconcat(hom, "/.ee", NULL);
+ i = stat(s, &sb);
+ if (i == -1 && errno == ENOENT)
+ mkdir(s, S_IRWXU);
+ g_free(s);
s = g_strconcat(hom, "/.ee/settings", NULL);
g_free(hom);
f = fopen(s, "w");
+ if (!f)
+ {
+ g_free(s);
+ return;
+ }
+
g_free(s);
scrolled_view = GPOINTER_TO_INT
(gtk_object_get_data(GTK_OBJECT(image_display), "forcescroll"));
|