Skip to content

Commit

Permalink
Fixed #3689
Browse files Browse the repository at this point in the history
  • Loading branch information
andris-sevcenko committed Mar 5, 2019
1 parent 61793e4 commit ab459d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Fixed a bug where the `--uid` option on `resave/*` console commands wasn’t working. ([#3941](https://github.com/craftcms/cms/issues/3941))
- Fixed a SQL error that could occur when running `resave/*` console commands.
- Fixed a PHP error that occurred when calling the deprecated `getError()` method on a model that had no errors. ([#3934](https://github.com/craftcms/cms/issues/3934))
- Fixed a bug where new folder names would not be sanitized when created via asset manager. ([#3689](https://github.com/craftcms/cms/issues/3689))

## 3.1.15 - 2019-02-26

Expand Down
4 changes: 4 additions & 0 deletions src/helpers/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public static function prepareAssetName(string $name, bool $isFilename = true, b
$baseName = '-';
}

if (!$isFilename) {
$baseName = $baseNameSanitized;
}

return $baseName . $extension;
}

Expand Down

0 comments on commit ab459d8

Please sign in to comment.