Describe the bug
When using arc a edit, filling out the new data, saving and exiting the editor, the console prints "could not parse query: ERROR: File was corrupted in Editor".
To Reproduce
Steps to reproduce the behavior:
Create new folder
Open console in this folder with the ArcCommander available
arc init
arc i create -> Write some data of your choice
arc a add-> Write some data of your choice
arc a edit -> Access the newly created assay with the corresponding identifier and edit some data of your choice
See error
Expected behavior
Normal editing of the file.
OS and framework information (please complete the following information):
OS: Windows 10 Pro 64-bit
OS Version: 10.0, Build 19042
Additional context
The problem already has been tracked down: It is the NewLine solution for bug #80, done in PR #81 which results in char '\013' (Carriage Return) being added to the end of each line. A deserialization of the string later fails due to incorrect pattern matching. Solution: Add a String.replace to delete all the Carriage Returns. In non-Windows-OSs there won't be anything to replace which is no problem since the function only replaces those cases where it matches and doesn't fail if there's no matching case.
Describe the bug When using
arc a edit
, filling out the new data, saving and exiting the editor, the console prints "could not parse query: ERROR: File was corrupted in Editor".To Reproduce Steps to reproduce the behavior:
arc init
arc i create
-> Write some data of your choicearc a add
-> Write some data of your choicearc a edit
-> Access the newly created assay with the corresponding identifier and edit some data of your choiceExpected behavior Normal editing of the file.
OS and framework information (please complete the following information):
Additional context The problem already has been tracked down: It is the
NewLine
solution for bug #80, done in PR #81 which results in char'\013'
(Carriage Return) being added to the end of each line. A deserialization of the string later fails due to incorrect pattern matching.Solution: Add a
String.replace
to delete all the Carriage Returns. In non-Windows-OSs there won't be anything to replace which is no problem since the function only replaces those cases where it matches and doesn't fail if there's no matching case.