mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-28 06:12:53 -06:00
CtrlLib: FileSel: Fixed issues with quotes
git-svn-id: svn://ultimatepp.org/upp/trunk@6707 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
8282376b90
commit
f65a99f7ed
1 changed files with 5 additions and 9 deletions
|
|
@ -875,6 +875,9 @@ String TrimDot(String f) {
|
|||
|
||||
void FileSel::AddName(Vector<String>& fn, String& f) {
|
||||
if(!f.IsEmpty()) {
|
||||
f = TrimDot(f);
|
||||
if(f[0] == '\"' && f.GetCount() > 2)
|
||||
f = f.Mid(1, f.GetCount() - 2);
|
||||
if(f.Find('.') < 0) {
|
||||
String t = GetMask();
|
||||
int q = t.Find('.');
|
||||
|
|
@ -888,11 +891,7 @@ void FileSel::AddName(Vector<String>& fn, String& f) {
|
|||
if(defext.GetCount())
|
||||
f << '.' << defext;
|
||||
}
|
||||
f = TrimDot(f);
|
||||
if(f[0] == '\"' && f.GetCount() > 2)
|
||||
fn.Add(f.Mid(1, f.GetCount() - 2));
|
||||
else
|
||||
fn.Add(f);
|
||||
fn.Add(f);
|
||||
}
|
||||
f.Clear();
|
||||
}
|
||||
|
|
@ -938,10 +937,7 @@ void FileSel::Finish() {
|
|||
AddName(fn, o);
|
||||
s++;
|
||||
for(;;) {
|
||||
if(*s == '\0')
|
||||
AddName(fn, o);
|
||||
else
|
||||
if(*s == '\"') {
|
||||
if(*s == '\0' || *s == '\"') {
|
||||
AddName(fn, o);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue