This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[Closed] Access Denied to delete a program I made!?
Started by Shnupbups, 24 March 2013 - 11:56 AMPosted 24 March 2013 - 12:56 PM
I'm coding an auto-updater for my CCScreensaver. The problem is, I can't delete it. No matter what I do! fs.delete, rm, delete… I need to be able to delete the file inside of CC for the auto-updater to work! It just errors with Access denied.It's MY program! Y I NO HAVE ACCESS?!
Posted 24 March 2013 - 01:00 PM
Are you using CC-Emu?
Posted 24 March 2013 - 01:00 PM
Nope! Minecraft.Are you using CC-Emu?
Posted 24 March 2013 - 01:03 PM
Odd.. I have no idea. Restart the computer maybe?
Posted 24 March 2013 - 01:08 PM
I've restarted Minecraft completely a couple of times, nothing.Odd.. I have no idea. Restart the computer maybe?
Posted 24 March 2013 - 01:13 PM
That is odd…
Posted 24 March 2013 - 01:14 PM
restart the computer and try again(the cc computer :unsure:/> )I've restarted Minecraft completely a couple of times, nothing.Odd.. I have no idea. Restart the computer maybe?
and if that dont works then
delete the file from the minecraft folder(Windows: %appdata%/.minecraft/saves/[yourworld]/computer/[your computer id])
Posted 24 March 2013 - 01:14 PM
Do you have something that opens the file?
--Like Startup file
file = fs.open(yourFileName,"w")
--[[
You have maybe forgotten
to close the file?
Here it would be file.close() for example..
]]--
Then if you try to delete it it will say access denied.. Otherwise I don't know how you are getting the error..Posted 24 March 2013 - 01:30 PM
I do not know why this happened, but it randomly decided to work. Please close this topic.
Posted 24 March 2013 - 10:23 PM
You probably forgot to close it when using fs.open :P/>
I don't understand why people save the contents from the web into a new file. Why not just save it into a variable and if it's a new version or whatnot, open the file of your program and write the new contents in…
I don't understand why people save the contents from the web into a new file. Why not just save it into a variable and if it's a new version or whatnot, open the file of your program and write the new contents in…