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

Bugfix

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