mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-17 23:14:18 +03:00
[project @ 2003-09-26 21:58:11 by jmb]
Improve image filename discovery svn path=/import/netsurf/; revision=319
This commit is contained in:
parent
0650ab2886
commit
9b6a3f62be
@ -109,7 +109,7 @@ void about_create(void) {
|
||||
struct plugd *temp;
|
||||
FILE *fp;
|
||||
char *buf, *val, var[20], *ptype, *pdetails, *fname, *furl, *p, *leafname;
|
||||
int i, nofiles, j, w, h, size;
|
||||
int i, nofiles, j, w, h, size, pneeded;
|
||||
os_fw fh;
|
||||
os_error *e;
|
||||
|
||||
@ -198,11 +198,13 @@ void about_create(void) {
|
||||
}
|
||||
else {
|
||||
/* Type 3: image file with name xxwwwwhhhh */
|
||||
/* get actual file name - isn't there an easier way? */
|
||||
fname = xcalloc(strlen(buf)+40, sizeof(char));
|
||||
xosfind_openinw(osfind_NO_PATH, buf, 0, &fh);
|
||||
xosargs_read_pathw(fh, fname, (int)strlen(buf)+10,0);
|
||||
xosfind_closew(fh);
|
||||
/* get actual file name */
|
||||
sprintf(var, "%2.2d*", j);
|
||||
sprintf(buf, "%s.", val);
|
||||
xosfscontrol_canonicalise_path(var, 0, 0, buf, 0, &pneeded);
|
||||
fname = xcalloc((10-pneeded), sizeof(char));
|
||||
xosfscontrol_canonicalise_path(var, fname, 0, buf,
|
||||
(10-pneeded), 0);
|
||||
|
||||
furl = xcalloc(strlen(fname) + 20, sizeof(char));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user