# Wrong error message when removing file

**URL:** <https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268>\
**Category:** Photoshop\
**Tags:** bug\
**Created:** [November 25, 2020, 12:09am UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268 "2020-11-25T00:09:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 25, 2020, 12:09am UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/1 "2020-11-25T00:09:00Z")

</div>

I get this error message but file is removed anyway. The statement about permission is wrong since I do use plugin folder for settings.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/9/906c0405e27fe1bf4b620c7b95dd3b202ef78fd0.png)

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [November 25, 2020, 12:13pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/2 "2020-11-25T12:13:15Z")

</div>

Hm, the plugin folder is read-only, isn’t it? Still strange that the error shows up **and** the file gets deleted anyway

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 25, 2020, 12:27pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/3 "2020-11-25T12:27:35Z")

</div>

Nope read-only is other directory. I do use the directory for plugin settings.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [November 25, 2020, 2:02pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/4 "2020-11-25T14:02:18Z")

</div>

You mean the Data-folder? The names can get confusing since the read-only one is accessed via fs.getPluginFolder()

I just tested it and I can delete files from the Data-folder without any error. You’re logged in as an admin I assume?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 25, 2020, 2:07pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/5 "2020-11-25T14:07:35Z")

</div>

Yes, I am. And at the same time, Photoshop.exe does not have elevated privileges. Also, I do use try/catch statement.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [November 25, 2020, 2:31pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/6 "2020-11-25T14:31:37Z")

</div>

> [@Jarda](#):
>
> I do use try/catch statement.

Are you explicitly showing that error via app.showAlert() in the catch block or does Photoshop display the error automatically? If you triggered it, I can test it later if the same error occurs to me to in the catch block.

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [November 25, 2020, 2:44pm UTC](https://forums.creativeclouddeveloper.com/t/wrong-error-message-when-removing-file/2268/7 "2020-11-25T14:44:58Z")

</div>

I have to do. Otherwise my plugin would be rejected in Marketplace. And also it makes sense.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/f/f6555c9b173239357709e7157b7a3bebd33b13e9.png)
