tristanpoland / SkiffUI

Create container images at the click of a button, and manage your network with an easy-to-use, intuitive UI
Apache License 2.0
5 stars 1 forks source link

No warning for corrupt files #14

Closed tristanpoland closed 1 year ago

tristanpoland commented 1 year ago

There is no warning for corrupt files, they can crash the program, or simply open a blank unusable graph.

WilliamAnimate commented 1 year ago

i have no idea how corrupt files work, but i'll assume (for this case) the entire file is completely screwed up in the first few bytes of the file, there will be bytes to mark it as "not corrupted"

and just in case only like 1/4 of the file is corrupt, we just use the python equalivant (cant spell) of a try{} loop edit: probably also shove the bytes or stuff into the file ending just to be extra sure

tristanpoland commented 1 year ago

What I will probably end up doing is a simple Try-catch (try except in Python) so that when it loads the file if it encounters any errors it catches them by simply creating a pop up that says that the file is corrupt. I can probably also implement a syntax checker that attempts to correct for any missing or unclosed brackets in the file etc so that it can at least restore some of it if its a simpler issue

tristanpoland commented 1 year ago

Issue was resolved