ReMarkableAPI icon indicating copy to clipboard operation
ReMarkableAPI copied to clipboard

Deleting root-node gives issues

Open Anonym-Bruker opened this issue 6 years ago • 0 comments

When uploading a file with the command like this: remarkable.php upload /path1/path2/path3/filename.txt the script correctly creates all the directories path1->path2->path3 with the name inside path3. This worked excellent.

But then I tried to delete "path1" directly, without deleting the sub-directories. This delete is not "recursive", so the sub-directories seem to still exist, and then seems to lead to some corruption. When I tried to run the "remarkable.php list"-command, it gave an error message about wrong metadata (Don't remember the exact error message)

But if I deleted all the path2, path3 and the file inside path3, the list-command worked again, and it seems that I cleaned everything up.

=> Please consider one of two options:

  1. Don't allow to delete directories that are not empty
  2. Make the delete-command recursive to delete everything

Else, love the php-"app"!

Anonym-Bruker avatar Feb 25 '19 10:02 Anonym-Bruker