application/src/PodcastSettingsView.cpp
changeset 73 83752b9e3cb6
parent 72 236022094302
child 74 af6475fdf8d6
equal deleted inserted replaced
72:236022094302 73:83752b9e3cb6
   299 			HBufC *title = iCoeEnv->AllocReadResourceLC(R_PODCAST_SETTING_DIRECTORY);
   299 			HBufC *title = iCoeEnv->AllocReadResourceLC(R_PODCAST_SETTING_DIRECTORY);
   300 			if (AknCommonDialogsDynMem::RunFolderSelectDlgLD (types, selectedFolder,
   300 			if (AknCommonDialogsDynMem::RunFolderSelectDlgLD (types, selectedFolder,
   301 					startFolder, NULL, NULL, *title))
   301 					startFolder, NULL, NULL, *title))
   302 				{
   302 				{
   303 				_LIT(KPodcastsDir, "Podcasts");
   303 				_LIT(KPodcastsDir, "Podcasts");
   304 				if (selectedFolder.Find(KPodcastsDir) != selectedFolder.Length()-9)
   304 				TInt pos = selectedFolder.Find(KPodcastsDir);
       
   305 				if (pos == KErrNotFound || pos != selectedFolder.Length()-9)
   305 					{
   306 					{
   306 					// append "Podcasts" if the folder isn't already called this
   307 					// append "Podcasts" if the folder isn't already called this
   307 					selectedFolder.Append(KPodcastsDir);
   308 					selectedFolder.Append(KPodcastsDir);
   308 					}
   309 					}
       
   310 				
       
   311 				if (selectedFolder[selectedFolder.Length()-1] != '\\')
       
   312 					{
       
   313 					selectedFolder.Append(_L("\\"));
       
   314 					}
       
   315 				
   309 				iShowDir.Copy(selectedFolder);
   316 				iShowDir.Copy(selectedFolder);
   310 				LoadSettingsL();
   317 				LoadSettingsL();
   311 				}
   318 				}
   312 			CleanupStack::PopAndDestroy(title);
   319 			CleanupStack::PopAndDestroy(title);
   313 			}
   320 			}