i used the following code:
const char *s = currentFolderPath.GetNativePathCString();
nsCAutoString str(s);
nsCOMPtr<nsILocalFile> fn;
rv = NS_NewNativeLocalFile(str, PR_FALSE, getter_AddRefs(fn));
if (NS_FAILED(rv)) return rv;
even rv returns NS_OK, i can't find the file anywhere, why?
this code got the same result:
nsString aFileName(currentFolderNameStr);
nsCAutoString aFileName;
aFileName.AssignWithConversion(str.get());
nsCOMPtr<nsILocalFile> fn;
rv = NS_NewNativeLocalFile(aFileName, PR_FALSE, getter_AddRefs(fn));
if (NS_FAILED(rv)) return rv;
what's wrong?