From 21161eb0dc63cb0fe99fc0252e63178c1deb0baf Mon Sep 17 00:00:00 2001 From: anasrferreira Date: Tue, 3 Mar 2015 18:02:51 -0800 Subject: [PATCH] newparse strips the path from inputfilename if outputdirectory is given --- src/main/C/newparse/newparse.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/C/newparse/newparse.cpp b/src/main/C/newparse/newparse.cpp index b0a0c3da..7898f53f 100755 --- a/src/main/C/newparse/newparse.cpp +++ b/src/main/C/newparse/newparse.cpp @@ -94,7 +94,9 @@ int main(int argc, char ** argv) { string rname = here; if (strstr(here, ".gz") - here == strlen(here) - 3) { rname = rname.substr(0, strlen(here) - 3); - } + } + // if outputdir given, this strips path from inputfile + if (odname.size() != 0) rname = rname.substr(rname.find_last_of("\\/")+1); writeIntVec(tokens, odname+rname+".imat"+suffix, membuf); tokens.clear(); numlines = 0;