Enlightenment CVS committal
Author : mej
Project : e16
Module : epplets
Dir : e16/epplets/api
Modified Files:
epplet.c
Log Message:
Thu Feb 10 23:27:41 2005 Michael Jennings (mej)
Rename package back to just "epplets."
Allow for ~/.e16 in addition to ~/.enlightenment.
Fix E-Disk for 2.6 kernels.
----------------------------------------------------------------------
===================================================================
RCS file: /cvsroot/enlightenment/e16/epplets/api/epplet.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -3 -r1.130 -r1.131
--- epplet.c 30 Oct 2004 15:36:00 -0000 1.130
+++ epplet.c 11 Feb 2005 04:29:17 -0000 1.131
@@ -5495,12 +5495,25 @@
Epplet_find_instance(char *name)
{
struct stat st;
- char s[1024];
+ char s[1024], *tmpdir;
int i = 0, fd;
pid_t pid;
+ /* Find E dir */
+ Esnprintf(s, sizeof(s), "%s/.e16", getenv("HOME"));
+ if (stat(s, &st) < 0)
+ {
+ Esnprintf(s, sizeof(s), "%s/.enlightenment", getenv("HOME"));
+ if (stat(s, &st) < 0)
+ {
+ Esnprintf(s, sizeof(s), "%s/.enlightenment", getenv("HOME"));
+ mkdir(s, S_IRWXU);
+ }
+ }
+ tmpdir = strdup(s);
+
/* make sure basic dir exists */
- Esnprintf(s, sizeof(s), "%s/.enlightenment/epplet_config", getenv("HOME"));
+ Esnprintf(s, sizeof(s), "%s/epplet_config", tmpdir);
if (stat(s, &st) < 0)
{
if (mkdir(s, S_IRWXU) < 0)
@@ -5512,14 +5525,16 @@
s, strerror(errno));
Epplet_dialog_ok(err);
epplet_instance = 1;
+ free(tmpdir);
return;
}
}
- /* make sure this epplets config dir exists */
- Esnprintf(s, sizeof(s), "%s/.enlightenment/epplet_config/%s",
- getenv("HOME"), name);
+ /* make sure this epplet's config dir exists */
+ Esnprintf(s, sizeof(s), "%s/epplet_config/%s", tmpdir, name);
conf_dir = strdup(s);
+ free(tmpdir);
+
if (stat(s, &st) < 0)
{
if (mkdir(s, S_IRWXU) < 0)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs