Commit 0b8c9927 authored by Dainis Abols's avatar Dainis Abols
Browse files

4.0.1

parent 36846001
......@@ -71,7 +71,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
*
* @var string
*/
protected $targetPath = '_migrated/';
protected $targetPath = 'user_upload/';
/**
* @return string Unique identifier of this updater
......@@ -208,26 +208,9 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
$fileUid = null;
$sourcePath = Environment::getPublicPath() . '/' . $item;
$strippedPath = str_replace("fileadmin/user_upload/", "", $item);
$targetDirectory = Environment::getPublicPath() . '/' . $fileadminDirectory . $this->targetPath;
$targetPath = $targetDirectory . $strippedPath;
// Remove file name
$temp = explode("/", $strippedPath);
array_pop($temp);
$subdir = implode("/", $temp);
$subdir = $targetDirectory . $subdir;
// maybe the file was already moved, so check if the original file still exists
if (file_exists($sourcePath) && !is_dir($sourcePath)) {
if (!is_dir($targetDirectory)) {
GeneralUtility::mkdir_deep($targetDirectory);
}
// Create subdirectory
if (!is_dir($subdir)) {
GeneralUtility::mkdir_deep($subdir);
}
// see if the file already exists in the storage
$fileSha1 = sha1_file($sourcePath);
......@@ -247,9 +230,6 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
// the file exists, the file does not have to be moved again
if (is_array($existingFileRecord)) {
$fileUid = $existingFileRecord['uid'];
} else {
// just move the file (no duplicate)
rename($sourcePath, $targetPath);
}
}
......
......@@ -4,7 +4,7 @@
## Version
4.0.0
4.0.1
## Dependencies
......
{
"name": "luitd/lu-nabamusic",
"version": "4.0.0",
"version": "4.0.1",
"description": "Radio NABA plugin used for live stream, song tops and much more",
"type": "typo3-cms-extension",
"keywords": [
......
......@@ -13,7 +13,7 @@ $EM_CONF[$_EXTKEY] = [
'modify_tables' => '',
'clearCacheOnLoad' => 1,
'lockType' => '',
'version' => '4.0.0',
'version' => '4.0.1',
'constraints' => [
'depends' => [
'typo3' => '10.0.0-10.9.99',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment