Project

General

Profile

Actions

Bug #21605

closed

recursive file copy on windows

Added by Kay Strobach about 15 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-11-18
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I got the following error message:
The item "piwik_patches" was not a file or directory! (msg#2.2.130)
During developing piwikintegration. After quite a while of debugging a found out that t3lib_extfilefunc doesn't support recursive folder copy on windows systems ...

http://typo3.org/fileadmin/typo3api-4.0.0/d6/d98/class_8t3lib__extfilefunc_8php-source.html#l00451

I throws the wrong error for me, the correct error message should be:
'Recursive copy is not supported under windows'
This could be done easily with an additional ifelse where @is_dir($theFile) is true and TYPO3_OS=WIN.
The alternative would be an recursive call of a private function or regeneration of the cmd array to perform a recursive copy with directories.

Best Regards

Kay

(issue imported from #M12657)

Actions #1

Updated by Kay Strobach about 15 years ago

//recursive directory copy is not supported under windows ... so create a new cmd array ... ;) for recursive copy
$source = ''; //set value
$dest = ''; //set value
$cmd = array();
$t = t3lib_div::getAllFilesAndFoldersInPath(
array(),
$source,
'',
true,
99
);
foreach($t as $entry) {
$shortEntry = str_replace($source,'',$entry);
if($shortEntry!='' && $shortEntry!='.')
if(is_dir($entry)) {
$cmd['newfolder'][] = array(
'data' => basename($shortEntry),
'target' => dirname($dest.$shortEntry),
);
} elseif(is_file($entry)) {
$cmd['copy'][] = array(
'data' => $entry,
'target' => $dest.$shortEntry,
);
}
}

Actions #2

Updated by Alexander Opitz over 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • TYPO3 Version set to 4.3

The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

Actions #3

Updated by Kay Strobach over 11 years ago

still valid in 4.x - not yet checked in 6.x, but should be still valid.

Actions #4

Updated by Alexander Opitz over 11 years ago

  • Status changed from Needs Feedback to New
Actions #5

Updated by Kay Strobach over 10 years ago

afaik this seems to work with FAL

Actions #6

Updated by Alexander Opitz almost 10 years ago

  • Status changed from New to Needs Feedback
  • Is Regression set to No

So I'd like to close this issue.

Actions #7

Updated by Kay Strobach almost 10 years ago

as i do not use windows anymore, i'm fine with that!

Actions #8

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed

Thanks

Actions

Also available in: Atom PDF