Skip to content

Fixed output file name#1

Open
DPDmancul wants to merge 1 commit intomedvedevgroup:masterfrom
DPDmancul:master
Open

Fixed output file name#1
DPDmancul wants to merge 1 commit intomedvedevgroup:masterfrom
DPDmancul:master

Conversation

@DPDmancul
Copy link
Copy Markdown

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;
}

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant