This is a remake of the other post since im not sure you read or reply to them, when they are in the closed bug section.
So ill just focus on one of the problems.
If you use NW.js open folder dialog you can select folder on your disk.
Then you can use "List files from path "C:\Users\" etc.
However if you use it with "On open folder dialog". Which would make sense since both functionalities are from NW.js you will notice that "List files from path" doesn't work with "Chosenpath" because when that is used with "Open folder dialog" it doesn't return the selected folder. Instead it return all files and sub folders that are in the selected folder.
That means if you do something like this "List files from path = NWjs.Chosenpath" which would be the most logic thing to do. It doesn't work, because chosenpath returns everything in the folder including sub folder names, but not the selected folder. If you choose an empty folder for instant it doesn't return anything at all. Making "Open folder dialog", "List files from path" and "Chosenpath" not compatible.
It works in different ways depending on, how you use "List files from path" which complicate the explanation a bit.
ONLY WHEN YOU USE CHOSENPATH
1. If the folder selected is empty, meaning no files in it. It doesn't return the folder name as expected. It will return nothing.
2. If there are files in the folder it doesn't return the folder name, but instead it returns the file names and sub folder names of all the folders in the selected one, under one condition that there are files in the sub folder, those sub folders where there are no files are not returned.
The problem occurs since "List files from path" requires a folder path ("C:\Users\") and doesn't work if the file name is included ("C:\Users\Test.txt"). It would be logic that "Open folder dialog" which actually let you select a folder, would be compatible with "List files from path" since this needs a folder to work.
If you compare "List files from path" where you write the path manually like : "C:\Test folder\" and through the "Open folder dialog" where you select the "Test folder" you get the following results.
Example 1: Uses "Open folder dialog"
First of all it doesn't actually return the selected folder, but it returns all the files in the folder including those sub folders which have files in it. Comparing that to Example 2, you can see that there is actually a folder in there called "Sub folder 2" which is empty.
Example 2: Manual written path
Again it doesn't return the folder name, which is logic, since its manually written. however it does return all the content, except the file d.txt which are in the Sub folder. And which is returned in example 1.
So putting it all together, its a huge "mess" of incompatible functionality that gives different results depending on how they are used. Which makes it difficult and not very logic to work with, because all things have to be corrected, parsed etc. to make it work.
That's why it was hard to explain it the first time as a single problem, because it involve a lot of things. Hope it makes a bit more sense now, why there is something wrong with how you as user would expect it to work, compared to how it actually works. Because as it is now its more or less impossible to work with, and requires a lot of workaround to make any use out of it.
(PS. As I started out saying im not sure if you read closed bug reports, but could you please take a look at this if you normally don't. Whether that would be possible or not: https://www.scirra.com/forum/r200-load-image-from-url-or-nwjs-bug-v2_t128806)
Attach a Capx
Description of Capx
Just open a folder to be used with the ListAt funtionality
Steps to Reproduce Bug
Use open folder dialog, ChosenPath and ListAt
Open dialog folder is unable to return the path to the folder.
Returns every single file and subfolder in the selected folder.
- Chrome: (YES)
- FireFox: (YES)
- Internet Explorer: (YES)
Operating System and Service Pack
Construct 2 Version ID