Hi
I took a look at the Bug #701290 and I suggest this solution :
I
suggest that protection against wrong file name will be done on the
client side. I do an enhancement by modifying the slot function
'create_folder_clicked' in WorkplaceFilesWidget class. I added a simple
test using boost function 'portable_name(std::string)'. briefly this
function tests if the string passed in parameter can be a suitable file
name, either in Windows or Linux , or not
(http://www.boost.org/doc/libs/1_33_1/libs/filesystem/doc/portability_guide.htm)So
the test on 'm_line_edit' will be extended and it will look like this :
if
(m_line_edit->text().isEmpty())return;if(!boost::filesystem::portable_name(m_line_edit->text().toStdString())){QMessageBox::warning(this,
"Invalid file name!","'" + m_line_edit->text() + "' isn't a valid file name",
QMessageBox::Ok);return;}
By
this few lines the issue seems to be avoided. see the attached image
with the message when we use a special character as a folder name.
What do you think ?
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Mira-development mailing list
Mira-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mira-development