<p>This has happened to me in a couple scenarios:</p>

<ul>
<li>When I am working across multiple environments and forgot to sync assets properly. (i.e. I pulled down the database snapshot from production, but not the newer assets that would be referenced in its Assets index).</li>
<li>When one environment uses a case-sensitive file system (e.g. a unix host), and one uses a case-insensitive file system (e.g. OSX). In this case, syncs and Git pulls may fail to differentiate between files with similar names, and both Git and Assets may bugger up.</li>
</ul>

<p>Those are the first two things I'd double-check.</p>

CC BY-SA 3.0
2015-10-03T09:39:19.117Z
Hi Michael, I am in the second scenario (unix host in prod, OSX in local dev) but I dont understand how it would provoque the bug, as I did uploaded the assets directly from prod, and never updated those by git or from local FTP.
migmaker
CC BY-SA 3.0
2015-10-02T16:48:55.940Z
2015-10-02T16:48:55.940Z
Michael Rog
<p>Maybe the folder on the server has a different name to your local version. The folder "songcover" has a space and is capitalised in the warning dialog</p>

CC BY-SA 3.0
2015-10-02T15:17:21.190Z
FYI Craft is displaying asset name and not asset folder, but its not very important, just a detail.
migmaker
CC BY-SA 3.0
2015-10-02T14:45:15.633Z
2015-10-02T14:45:15.633Z
Anthony Cossins
<p>Launching the task <code>Update Asset Indexes</code> in <code>CP Settings / Tools</code>.  </p>

<p>At the end of this task Craft propose a dialog box for you to check some missing files that has been removed from the asset source/folder.  </p>

<p>But for some reason my Craft is constantly asking me to remove some files that still exist in folder. And if I click OK then it ask me on each indexing task to remove a randomly chosen file.  </p>

<p><a href="https://i.sstatic.net/LBcES.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/LBcES.jpg" alt="enter image description here"></a></p>

<p>One interesting clue is that this bug does not happen locally on my Mac Yosemite / MAMP local dev.  </p>

<p>Charset and Collation look right to me:
<a href="https://i.sstatic.net/ce47T.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ce47T.jpg" alt="enter image description here"></a></p>

<p>Any idea how to fix that? (server/mysql config?)<br>
Very annoying for me because I got metadata attached to assets so I cannot permit random deletion. It also remove the asset files inserted into entries.</p>

CC BY-SA 3.0
2015-09-28T19:31:28.560Z
What is the charset and collation of the database?
Brad Bell
CC BY-SA 3.0
2015-09-30T17:04:52.917Z
I added screengrab of tables collation. Looks good to me : utf8_unicode_ci
migmaker
<assets><index>
Craft assets indexing wants to remove files that still exist
# Craft assets indexing wants to remove files that still exist

(Asked by: username_0 on 2015-09-28)

Launching the task `Update Asset Indexes` in `CP Settings / Tools`.

At the end of this task Craft propose a dialog box for you to check some missing files that has been removed from the asset source/folder.

But for some reason my Craft is constantly asking me to remove some files that still exist in folder. And if I click OK then it ask me on each indexing task to remove a randomly chosen file.

[![enter image description here](https://i.sstatic.net/LBcES.jpg)](https://i.sstatic.net/LBcES.jpg)

One interesting clue is that this bug does not happen locally on my Mac Yosemite / MAMP local dev.

Charset and Collation look right to me:
[![enter image description here](https://i.sstatic.net/ce47T.jpg)](https://i.sstatic.net/ce47T.jpg)

Any idea how to fix that? (server/mysql config?)  
Very annoying for me because I got metadata attached to assets so I cannot permit random deletion. It also remove the asset files inserted into entries.

**Tags:** assets, index
> **Comments:**
> **username_1**: What is the charset and collation of the database?  
> **username_0**: I added screengrab of tables collation. Looks good to me : utf8_unicode_ci  

---

## 2 answers

### Answer by username_2 on 2015-10-02. Score: 3

This has happened to me in a couple scenarios:

* When I am working across multiple environments and forgot to sync assets properly. (i.e. I pulled down the database snapshot from production, but not the newer assets that would be referenced in its Assets index).
* When one environment uses a case-sensitive file system (e.g. a unix host), and one uses a case-insensitive file system (e.g. OSX). In this case, syncs and Git pulls may fail to differentiate between files with similar names, and both Git and Assets may bugger up.

Those are the first two things I'd double-check.

> **Comments:**
> **username_0**: Hi Michael, I am in the second scenario (unix host in prod, OSX in local dev) but I dont understand how it would provoque the bug, as I did uploaded the assets directly from prod, and never updated those by git or from local FTP.  

---

### Answer by username_3 on 2015-10-02. Score: 1

Maybe the folder on the server has a different name to your local version. The folder "songcover" has a space and is capitalised in the warning dialog

> **Comments:**
> **username_0**: FYI Craft is displaying asset name and not asset folder, but its not very important, just a detail.  

---

