Answers.Body: <p>This looks to have been fixed a few hours ago:</p>
  
  <p><a href="https://github.com/craftcms/cms/issues/2463" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/2463</a></p>
  
  <p>You could apply the fix yourself for an immediate solution:</p>
  
  <p><a href="https://github.com/craftcms/cms/commit/30db5af5b596e267db136a218209a65cc9fde36e" rel="nofollow noreferrer">https://github.com/craftcms/cms/commit/30db5af5b596e267db136a218209a65cc9fde36e</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T15:31:59.837Z
Answers.LastActivityDate: 2018-02-21T15:31:59.837Z
Answers.UserDisplayName: Luke Youell
Answers.Body: <p>Problem is related to the issue Luke pointed out but in a different location within the file.</p>
  
  <p>Change line 1060 in file /craft/vendor/craftcms/cms/src/services/AssetTransforms.php</p>
  
  <p>from</p>
  
  <pre><code>if (!FileHelper::unlink($file)) {
      Craft::warning("Unable to delete the file \"{$file}\".", __METHOD__);
  }
  </code></pre>
  
  <p>to</p>
  
  <pre><code>if (file_exists($file) &amp;&amp; !FileHelper::unlink($file)) {
      Craft::warning("Unable to delete the file \"{$file}\".", __METHOD__);
  }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-21T15:56:16.963Z
Answers.LastActivityDate: 2018-02-21T15:56:16.963Z
Answers.UserDisplayName: Guido Neele
Body: <p>When I delete an asset in the CP, the asset/file will be deleted, but it is still shown in the assets list (without thumb).</p>
  
  <p>The issue can't be solved with the "Update asset index" function. (There is also the file listed: "Missing file"!)</p>
  
  <blockquote>
    <p>yii\base\ErrorException: unlink(/Applications/MAMP/htdocs/xxxxxxxx/storage/runtime/assets/sources/108.png): No such file or directory in /Applications/MAMP/htdocs/xxxxxxxx/vendor/yiisoft/yii2/helpers/BaseFileHelper.php:407</p>
  </blockquote>
  
Tags: <assets><craft3>
Title: Craft 3 RC 11: Deleting Assets Issue
ThreadText: # Craft 3 RC 11: Deleting Assets Issue
  
  (Asked by: username_0 on 2018-02-21)
  
  When I delete an asset in the CP, the asset/file will be deleted, but it is still shown in the assets list (without thumb).
  
  The issue can't be solved with the "Update asset index" function. (There is also the file listed: "Missing file"!)
  
  > yii\base\ErrorException: unlink(/Applications/MAMP/htdocs/xxxxxxxx/storage/runtime/assets/sources/108.png): No such file or directory in /Applications/MAMP/htdocs/xxxxxxxx/vendor/yiisoft/yii2/helpers/BaseFileHelper.php:407
  
  **Tags:** assets, craft3
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-02-21. Score: 1 | Accepted answer
  
  This looks to have been fixed a few hours ago:
  
  <https://github.com/craftcms/cms/issues/2463>
  
  You could apply the fix yourself for an immediate solution:
  
  <https://github.com/craftcms/cms/commit/30db5af5b596e267db136a218209a65cc9fde36e>
  
  
  ---
  
  ### Answer by username_2 on 2018-02-21. Score: 1
  
  Problem is related to the issue username_1 pointed out but in a different location within the file.
  
  Change line 1060 in file /craft/vendor/craftcms/cms/src/services/AssetTransforms.php
  
  from
  
  ```
  if (!FileHelper::unlink($file)) {
      Craft::warning("Unable to delete the file \"{$file}\".", __METHOD__);
  }
  
  ```
  
  to
  
  ```
  if (file_exists($file) && !FileHelper::unlink($file)) {
      Craft::warning("Unable to delete the file \"{$file}\".", __METHOD__);
  }
  
  ```
  
  
  ---
  
  