This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Shnupbups's profile picture

[Closed] Access Denied to delete a program I made!?

Started by Shnupbups, 24 March 2013 - 11:56 AM
Shnupbups #1
Posted 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?!
SuicidalSTDz #2
Posted 24 March 2013 - 01:00 PM
Are you using CC-Emu?
Shnupbups #3
Posted 24 March 2013 - 01:00 PM
Are you using CC-Emu?
Nope! Minecraft.
SuicidalSTDz #4
Posted 24 March 2013 - 01:03 PM
Odd.. I have no idea. Restart the computer maybe?
Shnupbups #5
Posted 24 March 2013 - 01:08 PM
Odd.. I have no idea. Restart the computer maybe?
I've restarted Minecraft completely a couple of times, nothing.
SuicidalSTDz #6
Posted 24 March 2013 - 01:13 PM
That is odd…
FuuuAInfiniteLoop(F.A.I.L) #7
Posted 24 March 2013 - 01:14 PM
Odd.. I have no idea. Restart the computer maybe?
I've restarted Minecraft completely a couple of times, nothing.
restart the computer and try again(the cc computer :unsure:/> )
and if that dont works then
delete the file from the minecraft folder(Windows: %appdata%/.minecraft/saves/[yourworld]/computer/[your computer id])
TheOddByte #8
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..
Shnupbups #9
Posted 24 March 2013 - 01:30 PM
I do not know why this happened, but it randomly decided to work. Please close this topic.
remiX #10
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…