summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/util.cc
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-28 22:01:49 +0000
committerKarl Berry <karl@freefriends.org>2009-09-28 22:01:49 +0000
commit4ffd67ef7a9a1a465d2a8cc35a785edb149de24a (patch)
tree3d4edc7989e1207e31f6df6da1cb6cc1172a0cd1 /Build/source/utils/asymptote/util.cc
parente2e3d91772c578b56fb93aa7c6b6e519034ae2a1 (diff)
asymptote 1.87
git-svn-id: svn://tug.org/texlive/trunk@15535 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/util.cc')
-rw-r--r--Build/source/utils/asymptote/util.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/Build/source/utils/asymptote/util.cc b/Build/source/utils/asymptote/util.cc
index 46f99ab669d..b9c7db35155 100644
--- a/Build/source/utils/asymptote/util.cc
+++ b/Build/source/utils/asymptote/util.cc
@@ -153,16 +153,9 @@ void writeDisabled()
camp::reportError("Write/cd to other directories disabled; override with option -globalwrite");
}
-bool globalwrite(string name)
-{
- string outname=settings::outname();
- return (!outname.empty() && name.substr(0,outname.size()) == outname) ||
- globalwrite();
-}
-
void checkLocal(string name)
{
- if(globalwrite(name)) return;
+ if(globalwrite()) return;
#ifdef __CYGWIN__
if(name.rfind('\\') < string::npos) writeDisabled();
#endif
@@ -172,8 +165,8 @@ void checkLocal(string name)
string buildname(string name, string suffix, string aux)
{
- if(!globalwrite(name))
- name=stripDir(name);
+ string dir=stripFile(outname());
+ name=globalwrite() ? dir+name : dir+stripDir(name);
name=stripExt(name,defaultformat());
name += aux;