# Cursor corrupting files?

**URL:** <https://forum.cursor.com/t/cursor-corrupting-files/23389>\
**Category:** Bug Reports\
**Created:** [October 17, 2024, 4:13pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389 "2024-10-17T16:13:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alkans](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/alkans/32/8882_2.png) [@Alkans](https://forum.cursor.com/u/Alkans)\
**Post date:** [October 17, 2024, 4:13pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/1 "2024-10-17T16:13:55Z")

</div>

Tried to push some unrelated changes, found that one of the data model files is missing. It somehow shows in folder and in cursor project structure, but is inaccessible, regardsless of extension or filereader.  
Quite sad bc as a result that wastes so much time, im not sure if ‘ai features’ compensate for it.

![image](https://us1.discourse-cdn.com/cursor1/original/2X/a/a0f4d683cf9914fbb275557d12b8d43d4bdc4c9d.png)

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 17, 2024, 4:22pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/2 "2024-10-17T16:22:41Z")

</div>

Hi @Alkans

It’s not quite clear from your message what’s going on. One of the data model files is missing — what exactly are you referring to?

---

<div class="post-metadata">

**Author:** ![Alkans](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/alkans/32/8882_2.png) [@Alkans](https://forum.cursor.com/u/Alkans)\
**Post date:** [October 17, 2024, 4:29pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/3 "2024-10-17T16:29:25Z")

</div>

Hi @deanrie I’m referring to the situation where one of the files in project becomes corrupted. That means that the file exists, but cannot be opened regardless of extension variants (txt,py,etc) or filereader (notepad, vscode, etc).  
This situation led me to deleting the file, and recreating it.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 17, 2024, 4:38pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/4 "2024-10-17T16:38:36Z")

</div>

Is this happening with the Composer?

---

<div class="post-metadata">

**Author:** ![Alkans](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/alkans/32/8882_2.png) [@Alkans](https://forum.cursor.com/u/Alkans)\
**Post date:** [October 17, 2024, 4:41pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/5 "2024-10-17T16:41:24Z")

</div>

I am using the composer, but I’m not sure how it happened. I did flask db migration yesterday but as far as I know the file was not corrupted at the time. Spotted today when tried to push to github.

```auto
(venv) A@MacBook-Air xxx % git add .
error: read error while indexing backend/app/models/user.py: No such file or directory
error: backend/app/models/user.py: failed to insert into database
error: unable to index file 'backend/app/models/user.py'
fatal: updating files failed

```

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 17, 2024, 4:59pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/6 "2024-10-17T16:59:34Z")

</div>

cc @balta

---

<div class="post-metadata">

**Author:** ![balta](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/balta/32/8389_2.png) [@balta](https://forum.cursor.com/u/balta)\
**Post date:** [October 17, 2024, 6:54pm UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/7 "2024-10-17T18:54:13Z")

</div>

have you tried reverting to an earlier checkpoint on composer before the file got corrupted?

---

<div class="post-metadata">

**Author:** ![Alkans](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/alkans/32/8882_2.png) [@Alkans](https://forum.cursor.com/u/Alkans)\
**Post date:** [October 18, 2024, 9:33am UTC](https://forum.cursor.com/t/cursor-corrupting-files/23389/8 "2024-10-18T09:33:47Z")

</div>

Hi @balta no I have not, as I dont know how to do this. Anyways, I dont know the ‘moment’ it got corrupted, and composer instances are not saved in my cursor.
