Getting mkdir error when saving theme settings form.

Error

Warning: mkdir(): File exists in Drupal\Core\File\FileSystem->mkdirCall() (line 237 of core/lib/Drupal/Core/File/FileSystem.php).
Drupal\Core\File\FileSystem->mkdirCall('sites/default/files/seven', 509, , NULL) (Line: 222)
Drupal\Core\File\FileSystem->mkdir('sites/default/files/seven', 509, 1, NULL) (Line: 1184)
drupal_mkdir('sites/default/files/seven', 509, 1) (Line: 451)

Steps to reproduce the problem

Save configuration in Bootstrap4 settings or other theme settings page.
Appearance > Bootstrap4 > Settings
/admin/appearance/settings/bootstrap4

Comments

KelvinWong created an issue. See original summary.

kelvinwong’s picture

StatusFileSize
new614 bytes

The problem happens when the theme folder in the public file directory is already existed. The patch provided added an if statement to avoid the creation of theme folder when it is already there.

kelvinwong’s picture

Status: Active » Needs review

vladimiraus’s picture

Title: mkdir error » mkdir error when saving settings and compiling SASS
Version: 8.x-1.0-beta3 » 8.x-1.x-dev
Status: Needs review » Fixed

Thanks @KelvinWong
Patched and applied to dev and beta 4.

vladimiraus’s picture

Status: Fixed » Closed (fixed)