Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Skip directory paths when backup#44

Open
bigfox wants to merge 1 commit into
tatewake:masterfrom
bigfox:master
Open

Skip directory paths when backup#44
bigfox wants to merge 1 commit into
tatewake:masterfrom
bigfox:master

Conversation

@bigfox

@bigfox bigfox commented Nov 15, 2020

Copy link
Copy Markdown

Hi @tatewake,

I follow up on the conversation in #43 .

From a logical point of view, i think this patch is appropriate. RecursiveDirectoryIterator traverses all paths, including directory path itself, but Tar class support add file only (see Tar::addFile source code). So check if path is directory is ok.

Patch fix my issue #43 on my Dokuwiki instance, running on hosting with FreeBSD (12.1-STABLE) and PHP 7.4.8 (tested also with PHP 5.6). It is possible that FreeBSD will be the reason, why the function fread() return non-empty string for directory path (used here in Tar::addFile).

It solved the problem for me, maybe it could help someone else.

OS: FreeBSD 12.1-STABLE
PHP: 7.4.8
Dokuwiki: Release 2020-07-29 "Hogfather"
Plugin version: 2020-10-21

Thanks

P.S. It solved the problem for me, it could help someone else ;-)

@tatewake

Copy link
Copy Markdown
Owner

Ah, I see… so this could be a FreeBSD difference that's causing trouble and not a permissions problem. Yes, it sounds like this would be a worthwhile PR to include, thank you.

I'll do some independent testing when I have time here, and will likely merge this (and push a new release) if everything looks good.

Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants