You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello friends,
I've stumbled onto something while tinkering and testing.
I've found that the FileTree (FT) Null is getting created at the full path of the deleted target + a ref index, not at the parent folder of the delete target. This doesn't work since the parent of the Null is getting deleted, and so deleteTargets does not work (well, I'm pretty sure that's why its not working). The chain responds with a "Parent folder does not exist" and the associated hex is most definitely not the parent folder(?).
Even if you change the path argument for the NullMetaHandler initializer to the path of the actual parent folder (as seen below), this does not fix the problem because you're replacing the Ref in the parent folder with a Null at the deleted file's Ref index.
If this is the intended behaviour, then some code needs to be changed in FiletreeReader.pathToLookupPostProcess( ). Currently that method assumes all items in a folder are references and nothing else; consequently things bug out and jackal.js assumes an empty/broken folder as if everything got wiped.
Notice how pathToLookupPostProcess treats Nulls as if they are at the same level as folders and files; hence why I am really confused as to what is the nature of a Null.
If not, we'd need to change the location of the Null to the location of the deleted file (s/ulid/<deleted file ulid>) and eliminate any sort of refIndex from the equation.
There seems to be something similar going on with the metadata initialization of shared folders but it doesn't seem to be something broken or detremental to jackal.js functionality if I'm not mistaken.
Anyhow, I'm not sure what the envisioned way to use FT Nulls is and they are treated differently in different parts of the code so I can't do a PR for this. Let me know if you have any further questions.
The text was updated successfully, but these errors were encountered:
ahm23
changed the title
FileTree "Null"s are either not created properly or not parsed
FileTree "Null"s are either not created properly or not parsed whatsoever (and breaks the folder)
Sep 1, 2024
Hello friends,
I've stumbled onto something while tinkering and testing.
I've found that the FileTree (FT) Null is getting created at the full path of the deleted target + a ref index, not at the parent folder of the delete target. This doesn't work since the parent of the Null is getting deleted, and so
deleteTargets
does not work (well, I'm pretty sure that's why its not working). The chain responds with a "Parent folder does not exist" and the associated hex is most definitely not the parent folder(?).jackal.js/src/classes/storageHandler.ts
Lines 1385 to 1389 in 6996fc2
jackal.js/src/classes/encodingHandler.ts
Lines 441 to 455 in 6996fc2
Even if you change the
path
argument for theNullMetaHandler
initializer to the path of the actual parent folder (as seen below), this does not fix the problem because you're replacing the Ref in the parent folder with a Null at the deleted file's Ref index.If this is the intended behaviour, then some code needs to be changed in
FiletreeReader.pathToLookupPostProcess( )
. Currently that method assumes all items in a folder are references and nothing else; consequently things bug out and jackal.js assumes an empty/broken folder as if everything got wiped.jackal.js/src/classes/filetreeReader.ts
Lines 728 to 732 in 6996fc2
Notice how
pathToLookupPostProcess
treats Nulls as if they are at the same level as folders and files; hence why I am really confused as to what is the nature of a Null.jackal.js/src/classes/filetreeReader.ts
Lines 742 to 754 in 6996fc2
If not, we'd need to change the location of the Null to the location of the deleted file (
s/ulid/<deleted file ulid>
) and eliminate any sort of refIndex from the equation.There seems to be something similar going on with the metadata initialization of shared folders but it doesn't seem to be something broken or detremental to jackal.js functionality if I'm not mistaken.
Anyhow, I'm not sure what the envisioned way to use FT Nulls is and they are treated differently in different parts of the code so I can't do a PR for this. Let me know if you have any further questions.
The text was updated successfully, but these errors were encountered: