Bug #21605
closedrecursive file copy on windows
0%
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)
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,
);
}
}
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)?
Updated by Kay Strobach over 11 years ago
still valid in 4.x - not yet checked in 6.x, but should be still valid.
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
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.
Updated by Kay Strobach almost 10 years ago
as i do not use windows anymore, i'm fine with that!