[file.inc] wrong permissions check when deleting

Files affected

Which file(s) is(are) affected

  • libs/file.inc.src

Steps to reproduce

Wrong logic clearly identifiable from reading the "imports.file.delete" method

Expected behaviour

The permission check before deleting a file should reflect the permissions needed for said deletion
The required permission is the ability to edit its folder, as "deleting a file" is removing its link from the list from its parent folder

Actual behaviour

The method is checking the permissions from the deleted files, which aren't relevant when trying to delete it.
Such check would be logical to edit the content of the file, but the delete operation is modifying the content of its parent folder

Possible fixes

If you have a clue, explain which part of the code may need fixing, and how (don't forget to use code formatting for the code!)

imports.file.FileAccess(file.parent,"w")
Modification effectuée par LaplongeJunior