Merge pull request #186 from seisatsu/master
Fix save filename newline bug on Linux
This commit is contained in:
@@ -159,6 +159,11 @@ static std::string runFileDialog(const std::string& file, bool save) {
|
|||||||
if (fgets(buffer, 128, hfile) != NULL)
|
if (fgets(buffer, 128, hfile) != NULL)
|
||||||
filename += buffer;
|
filename += buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove possible unwanted newline included from end of popen() output
|
||||||
|
if (filename[filename.length()-1] == '\n')
|
||||||
|
filename.erase(filename.length()-1);
|
||||||
|
|
||||||
pclose(hfile);
|
pclose(hfile);
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user