32 |
gchar *Ltmpdir = (gchar *)sc_grave_get_data(Lg, "tmpdir"); |
gchar *Ltmpdir = (gchar *)sc_grave_get_data(Lg, "tmpdir"); |
33 |
gchar *Lonlyname = NULL, *Lnom = NULL, *Lnomutf8 = NULL; |
gchar *Lonlyname = NULL, *Lnom = NULL, *Lnomutf8 = NULL; |
34 |
gchar *Lonlynameparent = NULL; |
gchar *Lonlynameparent = NULL; |
35 |
gchar Lparents[MAXPATHLEN], Ltmp[MAXPATHLEN]; |
gchar Lparents[MAXPATHLEN], Ltmp[MAXPATHLEN*3], Lpart2[MAXPATHLEN]; |
36 |
GtkTreeIter LparentIter; |
GtkTreeIter LparentIter; |
37 |
GtkTreePath *Lparentpath; |
GtkTreePath *Lparentpath; |
38 |
gboolean Lreturn = FALSE; |
gboolean Lreturn = FALSE; |
46 |
|
|
47 |
*Lparents=*Ltmp=0; |
*Lparents=*Ltmp=0; |
48 |
Lparentpath = gtk_tree_path_copy(Apath); |
Lparentpath = gtk_tree_path_copy(Apath); |
49 |
_DEB("debuut avec => [%s] soit => [%s]\n", Lnom, Lonlyname); |
_DEB("debut avec => [%s] soit => [%s]\n", Lnom, Lonlyname); |
50 |
|
|
51 |
/* if (Ltype == TYPE_DIR) { |
/* if (Ltype == TYPE_DIR) { |
52 |
_DEB("creation rep => [%s]\n", Lonlyname); |
_DEB("creation rep => [%s]\n", Lonlyname); |
74 |
int lr; |
int lr; |
75 |
if (Ltype == TYPE_FILE) { |
if (Ltype == TYPE_FILE) { |
76 |
_DEB("creation graft file [%s/%s] car [%s]", *Lparents ? Lparents : "" , Lonlyname, Lnom); |
_DEB("creation graft file [%s/%s] car [%s]", *Lparents ? Lparents : "" , Lonlyname, Lnom); |
77 |
g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s=%s\n", *Lparents ? Lparents : "", Lonlyname, Lnom); |
/* g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s=%s\n", *Lparents ? Lparents : "", Lonlyname, Lnom); */ |
78 |
|
g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s", *Lparents ? Lparents : "", Lonlyname); |
79 |
|
sc_escape(Ltmp, (MAXPATHLEN-2)*2, "\\="); |
80 |
|
g_snprintf(Lpart2, MAXPATHLEN-1, "%s\n", Lnom); |
81 |
|
sc_escape(Lpart2, MAXPATHLEN-1, "\\="); |
82 |
|
strcat(Ltmp, "="); |
83 |
|
strcat(Ltmp, Lpart2); |
84 |
|
_DEB("===>'%s'", Ltmp); |
85 |
lr = write (Lfd, Ltmp, strlen (Ltmp)); |
lr = write (Lfd, Ltmp, strlen (Ltmp)); |
86 |
} else { |
} else { |
87 |
_DEB("creation graft repertoire [%s/%s]", *Lparents ? Lparents : "" , Lonlyname); |
_DEB("creation graft repertoire [%s/%s]", *Lparents ? Lparents : "" , Lonlyname); |
88 |
g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s=%s/tmpdir\n", *Lparents ? Lparents : "", Lonlyname, Ltmpdir); |
/* g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s=%s/tmpdir\n", *Lparents ? Lparents : "", Lonlyname, Ltmpdir); */ |
89 |
|
g_snprintf (Ltmp, MAXPATHLEN-1, "%s/%s", *Lparents ? Lparents : "", Lonlyname); |
90 |
|
sc_escape(Ltmp, (MAXPATHLEN-2)*2, "\\="); |
91 |
|
g_snprintf (Lpart2, MAXPATHLEN-1, "%s/tmpdir\n", Ltmpdir); |
92 |
|
sc_escape(Lpart2, MAXPATHLEN-1, "\\="); |
93 |
|
strcat(Ltmp, "="); |
94 |
|
strncat(Ltmp, Lpart2, MAXPATHLEN); |
95 |
|
|
96 |
|
_DEB("===>'%s'", Ltmp); |
97 |
|
|
98 |
lr = write (Lfd, Ltmp, strlen (Ltmp)); |
lr = write (Lfd, Ltmp, strlen (Ltmp)); |
99 |
|
|
100 |
} |
} |