aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.c
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2001-03-14 22:15:18 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2001-03-14 22:15:18 +0000
commitd92dd1b13bfd292ae123a46597549d351900a606 (patch)
tree39df5f6120af214e884286326d666f8d290cc2f7 /src/Write2D.c
parent136bb3e3f78b554e6ecc0fb8cebaa6ede2470a5e (diff)
Omit the leading "./" in output filenames if output goes into the current
directory. This makes downloading such output files via the web interface nicer because they doen't have any special characters in it. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@46 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src/Write2D.c')
-rw-r--r--src/Write2D.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/Write2D.c b/src/Write2D.c
index 328243a..f4f8909 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -194,12 +194,28 @@ FIXME: get rid of PUGH here
sprintf (slicename, "%s_[%d]", extensions[dir],
myGH->sp2xyz[groupinfo.dim - 1][dir] + 1);
- sprintf (filename, "%s/%s_%s.asc", myGH->outdir2D, alias, slicename);
+ /* skip pathname if output goes into current directory */
+ if (strcmp (myGH->outdir2D, "."))
+ {
+ sprintf (filename, "%s/%s_%s.asc", myGH->outdir2D, alias,slicename);
+ }
+ else
+ {
+ sprintf (filename, "%s_%s.asc", alias, slicename);
+ }
}
else
{
- sprintf (filename, "%s/%s_2d_%s.gnuplot", myGH->outdir2D, alias,
- extensions[dir]);
+ /* skip pathname if output goes into current directory */
+ if (strcmp (myGH->outdir2D, "."))
+ {
+ sprintf (filename, "%s/%s_2d_%s.gnuplot", myGH->outdir2D, alias,
+ extensions[dir]);
+ }
+ else
+ {
+ sprintf (filename, "%s_2d_%s.gnuplot", alias, extensions[dir]);
+ }
}
#endif
@@ -437,5 +453,4 @@ FIXME: get rid of PUGH here
} /* end of outputting the data by processor 0 */
} /* end of looping through xyz directions */
-
}