View | Details | Raw Unified | Return to issue 97053
Collapse All | Expand All

(-)VistaFilePickerImpl.cxx (-12 / +14 lines)
Lines 797-817 Link Here
797
    aLock.clear();    
797
    aLock.clear();    
798
    // <- SYNCHRONIZED
798
    // <- SYNCHRONIZED
799
799
800
	if( m_sDirectory.getLength()) 
800
	// we set the directory only if we have a save dialog and a filename
801
	// for the other cases, the file dialog remembers its last location
802
	// according to its client guid.
803
	if( m_sDirectory.getLength() )
801
	{
804
	{
802
		// we set the directory only if we have a save dialog and a filename
805
		ComPtr< IShellItem > pFolder;
803
		// for the other cases, the file dialog remembers its last location
806
		#ifdef __MINGW32__
804
		// according to its client guid.
807
			HRESULT hResult = SHCreateItemFromParsingName ( reinterpret_cast<LPCTSTR>(m_sDirectory.getStr()), NULL, IID_IShellItem, (void**)(&pFolder) );
805
		if (iSave.is() && m_sFilename.getLength())
808
		#else
809
			HRESULT hResult = SHCreateItemFromParsingName ( m_sDirectory, NULL, IID_PPV_ARGS(&pFolder) );
810
		#endif
811
		if ( SUCCEEDED(hResult) )
806
		{
812
		{
807
			ComPtr< IShellItem > pFolder;
813
			if( m_sFilename.getLength())
808
			#ifdef __MINGW32__
809
				HRESULT hResult = SHCreateItemFromParsingName ( reinterpret_cast<LPCTSTR>(m_sDirectory.getStr()), NULL, IID_IShellItem, (void**)(&pFolder) );
810
			#else
811
				HRESULT hResult = SHCreateItemFromParsingName ( m_sDirectory, NULL, IID_PPV_ARGS(&pFolder) );
812
			#endif
813
			if ( SUCCEEDED(hResult) )
814
				iDialog->SetFolder(pFolder);
814
				iDialog->SetFolder(pFolder);
815
			else
816
				iDialog->AddPlace(pFolder, FDAP_TOP);
815
		}
817
		}
816
	}
818
	}
817
	
819
	

Return to issue 97053