? ? Pending

User tests: Successful: Unsuccessful:

avatar BrainforgeUK
BrainforgeUK
16 Aug 2021

Summary of Changes

Only throw error if file does not exist.
If folder in zip file is empty then extract does not create the folder.
This caused the library installation to fail.

Testing Instructions

Install library
lib_bftest1.zip

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

Documentation Changes Required

None.

avatar BrainforgeUK BrainforgeUK - open - 16 Aug 2021
avatar BrainforgeUK BrainforgeUK - change - 16 Aug 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Aug 2021
Category Libraries
avatar bembelimen
bembelimen - comment - 16 Aug 2021

Hello @BrainforgeUK thank you for your PR.
I'm a bit unsure if this is a good way to be honest, if e.g. the unzip process has an error and there is then an empty folder which should have files but there aren't any, the installation succeed instead of fail...

avatar brianteeman
brianteeman - comment - 16 Aug 2021

If I remember correctly we have faced the same issue with core and that is why folders that would otherwise be empty eg cache, tmp and logs all have an index.html in there to ensure that the folder is created. I would recommend that you do the same with your library instead of this PR which as @bembelimen points out can introduce other issues.

avatar BrainforgeUK BrainforgeUK - change - 21 Aug 2021
Labels Added: ?
avatar BrainforgeUK BrainforgeUK - change - 21 Aug 2021
Labels Added: ?
Removed: ?
avatar brianteeman
brianteeman - comment - 7 Dec 2021

Empty folders in a zip file are bad. Windows even even removes them when you create zips. My 2c is that we dont need a solution in core for this and developers just have to include an index.html or similar in the folder if they want to include it in the zip

avatar bembelimen
bembelimen - comment - 22 Jan 2022

Thinking about this, there still shouldn't be empty folder ignored when it's there. So I'm closing this for now.

Still thanks for your contribution.

avatar bembelimen bembelimen - change - 22 Jan 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-01-22 11:40:19
Closed_By bembelimen
Labels Added: ? ?
Removed: ?
avatar bembelimen bembelimen - close - 22 Jan 2022

Add a Comment

Login with GitHub to post a comment