I tested the alpha 1.76.2 Alpha 4. I can not export a folder to csv, and then turn around and import it. It gives me an error with the import. Also, looking at the export, I see there is a FalseFalse towards the end of each line. Looks like a missing delimiter. Why is it outputting a semicolon; as the delimiter and not the standard colon? Can we have an option to choose what delimiter to use?
Not sure what you are using for CSV reading and writing, but I'm assuming you are using something custom built since there is a delimiter missing. I would suggest something like CSVHelper here on GitHub. It can read and write CSV files.
2018-03-07 15:26:12,762 [1] ERROR - Unable to import file.
Index was outside the bounds of the array.
Could you provide exact steps to replicate the issue? I'm not seeing the issue
I merely select a folder, choose export as file, choose csv, unselect user info options, and export. Gives me an error when trying to import that csv just created.
Well crap, I tried it today and am not able to reproduce it either.
Comparing the "bad" CSV to the one I just tested that works now. These are the columns that were missing in the "bad" CSV. The Username, Password, Domain is expected to be missing, as I unselected those from the list of what to export. And there is a extra Folder field in the "bad" csv.
Also, my script that builds a CSV file for me to import into MR. It outputs all fields with quoted text qualifiers. What library are you using to read the import CSV? Can we change it to one that is more CSV standard friendly, like CsvHelper?
When I try to import with a CSV with text qualifiers mRemoteNG gives me an error. So I have to open up the CSV in notepad and delete all the quotes that are text qualifiers. PowerShell's CSV-Export has no capability to tell it to not use text qualifiers.
Thanks for the info @johnwc, that will help a lot in diagnosing the issue.
As for the csv de/serialization code, it is home-grown. The legacy csv serialization was generated as a huge string, so I just did the deserialization code the same way. I wouldn't be opposed to switching to a library though.
I think I've fixed the underlying problem in the serialization now. The fix will be available in the next v1.76 pre-release
I played around with CsvHelper a bit, but switching over at this stage would be a bit more work than I'm willing to put in. Once v1.76 is out, maybe we can revisit it. I'm all for using a library to do this, but csv de/serialization isn't a feature I want to spend a lot of extra time on.
Grant me access to the project and I'd be willing to put some time into porting the existing CSV export to using CsvHelper. :-)
Fork + PR :)
We typically give repo-write access to folks that have been with the project for a bit. If you go through a few PRs and want to join the project we can certainly get that process going.
Sounds good.
Closing this issue since the originally reported bug is resolved.