string baseDir;
if( pos != string::npos )
baseDir = getHomeDir(workDir) + workDir.substr(pos+5,workDir.length()-5);
- else
- baseDir = workDir;
+ else{
+ pos = workDir.find("~");
+ if( pos != string::npos )
+ baseDir = getHomeDir(workDir) + workDir.substr(pos+1,workDir.length()-1);
+ else
+ baseDir = workDir;
+ }
tempOutputFile << "#BSUB -o " << baseDir << "/logs/output.log." << rootNameToExecute << endl ;
tempOutputFile << "#BSUB -e " << baseDir << "/logs/error.log." << rootNameToExecute << endl ;