Skip to content
Snippets Groups Projects

Update file filefield_paths.inc

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -114,7 +114,7 @@ function filefield_paths_filefield_paths_process_file(ContentEntityInterface $en
// Finalize file if necessary.
if ($file->getFileUri() !== $destination && file_exists($file->getFileUri())) {
$dirname = $file_system->dirname($destination);
$dir_exists = $file_system->prepareDirectory($dirname, FileSystem::CREATE_DIRECTORY);
$dir_exists = $file_system->prepareDirectory($dirname, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS) && $new_file = $file_system->move($file, $destination);
if (!$dir_exists) {
$logger->notice('The directory %directory could not be created.', ['%directory' => $dirname]);
continue;
Loading