Commit a1bbc3bf authored by yaroslav.kostenyuk's avatar yaroslav.kostenyuk
Browse files

Bugfix

parent 7b7b22b4
......@@ -2,8 +2,6 @@
namespace Drupal\synhelper\Hook;
use Drupal\Core\File\FileSystem;
/**
* FileValidate.
*/
......@@ -13,10 +11,11 @@ class FileValidate {
* Hook.
*/
public static function hook($file) {
$fileSystem = \Drupal::service('file_system');
$destination = self::transliteration($file->destination);
$basename = FileSystem::basename($destination);
$directory = FileSystem::dirname($destination);
$file->destination = \Drupal::service('file_system')->createFilename($basename, $directory);
$basename = $fileSystem->basename($destination);
$directory = $fileSystem->dirname($destination);
$file->destination = $fileSystem->createFilename($basename, $directory);
}
/**
......
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