From ba24205091c613582f9eec673f5aac947cd4820a Mon Sep 17 00:00:00 2001 From: howon kim Date: Thu, 5 Dec 2013 20:39:22 +0900 Subject: [PATCH] limiting the file name size to 32 charcaters Change-Id: I4cd385202bb9713885e9d9ec925c5d1c508ebcdd Signed-off-by: howon kim --- project/src/FileManagerForm.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/project/src/FileManagerForm.cpp b/project/src/FileManagerForm.cpp index d05e8de..6c73292 100644 --- a/project/src/FileManagerForm.cpp +++ b/project/src/FileManagerForm.cpp @@ -130,6 +130,17 @@ FileManagerForm::OnActionPerformed (const Tizen::Ui::Control &source, int action { fileName.Append(".xdb"); } + + if(fileName.GetLength() > 32) + { + MessageBox msgBox; + int modalResult; + + msgBox.Construct(L"Warning", L"File name too long.\nPlease rename (max 32 characters supported).", MSGBOX_STYLE_OK); + msgBox.ShowAndWait(modalResult); + return; + } + *pFolder = __currentPath + "/" + fileName; Tizen::Text::Utf8Encoding utf8; -- 2.7.4