UST icon indicating copy to clipboard operation
UST copied to clipboard

Fixed output file name

Open DPDmancul opened this issue 4 years ago • 0 comments

Before this if the source file does not contain any / (i.e. it is in the current location folder) the output file was named .ust.fa resulting invisible.

This was because the input file name reader looks for the name after the last / in the path. If a / cannot be found it used to return an empty string, now with this edit it will return the complete file name.

string getFileName(const string& s) {
   char sep = '/';
   size_t i = s.rfind(sep, s.length());
   if (i != string::npos) {
      return(s.substr(i+1, s.length() - i));
   }

   // else, if '/' is not in s

   // before: return("");
   // now:
   return s;
}

DPDmancul avatar Apr 02 '21 14:04 DPDmancul