Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » [Solved] SFTPBrowser example build failed (SFTPBrowser example buil error: error LNK2019: unresolved external symbol __imp_CertCloseStore referenced in function winstore_close)
Re: SFTPBrowser example build failed [message #61278 is a reply to message #61277] Thu, 19 December 2024 05:41 Go to previous messageGo to previous message
Scott_Huang is currently offline  Scott_Huang
Messages: 27
Registered: December 2024
Promising Member
Hello Oblivion,

I try do some minor adjustment to testing the last sample:
String  GetWorkdir() const          { 
    String workDir = dir.GetData().ToString(); 
    if(workDir == "/") return Null;
        else return workDir;
    }

Which intend set default as empty instead of "/", at least it work for 1st top layer.
(Still some bug, such as it would show as folder icon if I upload a test.txt file)

But when navigate to sub folder, it will not able correct LoadDir() again.
Then I try
DLOG(GetWorkdir());
	SFtp::DirList ls;
		// Get a remote dir listing.
	if(!browser->ListDir(GetWorkdir(), ls)) {
		DLOG(browser->GetErrorDesc());
		return;
	}
	// Filter the dir list.
	//auto files =  FilterRange(ls, [](const SFtp::DirEntry& e) { return e.IsFile() && e.GetSize() <= 65536; });	
	auto files =  FilterRange(ls, [](const SFtp::DirEntry& e) { return true; });
		// Download the files, using worker threads in parallel.
	CoFor(min(files.GetCount(), 1000), [&](int i){
		DLOG(files[i]);	});
by myself, it able list data correctly. So, may be you can update your sample to use SFtp::DirList way?

And then I try testing sfsi, since we know that portion have issue:
	DLOG("Start for sfsi.Find");	
		Array<FileSystemInfo::FileInfo> root = sfsi.Find("*");
		for(int i = 0; i < root.GetCount(); i++){
			DLOG(root[i].filename);
			//DLOG(root[i].root_style);
			//DLOG(root[i].root_desc);
		}
	DLOG("End for sfsi.Find");

It is work at 1st time when GetWordir() return Null, but failed when I select sub folder from dir dropdownlist.
Note, the SFTP server itself is Posix, since sfsi.IsPosix() return true, while my working computer is Windows.


So, I think the issue may be in Load() function in FileSel.cpp since at least work when if(dir.IsEmpty()) .
	Array<FileSystemInfo::FileInfo> ffi =
			filesystem.Find(AppendFileName(dir, filesystem.IsWin32() ? "*.*" : "*"));





And then I try reference/SFtpFileSel example per your suggestion for testing, the result as below:
index.php?t=getfile&id=7023&private=0


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Latest U++ PDF version user guide to describe framework/tips/examples
Next Topic: The UPP looks good -> Opportunities to evolve to better support RPA & AI
Goto Forum:
  


Current Time: Tue Aug 05 14:42:11 CEST 2025

Total time taken to generate the page: 0.02984 seconds