internet-sicherheit / ethereum-cache-creator

GNU General Public License v3.0
0 stars 0 forks source link

Don't append new output to existing file #28

Closed kiview closed 4 years ago

kiview commented 4 years ago

The current implementation will add a new JSON array object into the existing file, if file already existing. This leads to broken JSON and therefore can't be a desired behavior.

There are two alternatives:

  1. Append to existing JSON array
  2. Use a more complex JSON object as the file root and record each run as a new session
  3. Just override the file

1 sounds wrong and leads to semantically wrong data, so for the sake of simplicity, I'd suggest using solution 3.

Mschnuff commented 4 years ago

ok will focus on 3. should be a relative quick fix. there are also new exercises for school i have to work on.

Mschnuff commented 4 years ago

btw.: did you actually use the same file several times? maybe there is another reason for multiple arrays in the file.

kiview commented 4 years ago

btw.: did you actually use the same file several times? maybe there is another reason for multiple arrays in the file.

I didn't specify different filenames, so the answer should be yes.

Mschnuff commented 4 years ago

ok makes sense. file cannot be found on owncloud. :(

kiview commented 4 years ago

I don't know what you are talking about and how this is related to this issue, sorry.

Mschnuff commented 4 years ago

I think this issue was addressed.

kiview commented 4 years ago

It is not solved yet but will be once #30 is merged.

kiview commented 4 years ago

Fixed by #30.