Jump to content




Access Denied to fs.delete?


  • This topic is locked This topic is locked
10 replies to this topic

#1 brett122798

  • Members
  • 300 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 07 October 2012 - 09:35 PM

Hey, I'm pretty confused on how when deleting this file, it says "Access Denied." Here's a small part of the code:

if fs.exists(location.."/chat") == true then
fs.delete(location.."/chat")
end


#2 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 07 October 2012 - 09:46 PM

View Postbrett122798, on 07 October 2012 - 09:35 PM, said:

Hey, I'm pretty confused on how when deleting this file, it says "Access Denied." Here's a small part of the code:

if fs.exists(location.."/chat") == true then
fs.delete(location.."/chat")
end

This depends on the value of location, what is it? You can't delete files in /rom . And often, you can't delete files that are opened externally or something like that.

#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 07 October 2012 - 09:46 PM

Where is the file at? If it's in rom, you cannot edit the rom, so it would most certainly say "Access Denied".

#4 brett122798

  • Members
  • 300 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 07 October 2012 - 09:49 PM

Fixed the problem, don't know why it happened, really.

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 08 October 2012 - 01:01 AM

How did you manage to fix the problem brett?

#6 brett122798

  • Members
  • 300 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 08 October 2012 - 03:22 AM

View Postsidekick_, on 08 October 2012 - 01:01 AM, said:

How did you manage to fix the problem brett?
Well, I tried manually deleting the file and it said it was in use by Java, so I reset my server and it was fine.

#7 Pinkishu

  • Members
  • 484 posts

Posted 08 October 2012 - 07:00 AM

I had that happen to me when I opened files in programs but didn't close them xD

#8 brett122798

  • Members
  • 300 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 08 October 2012 - 02:23 PM

View PostPinkishu, on 08 October 2012 - 07:00 AM, said:

I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

#9 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 08 October 2012 - 02:51 PM

View Postbrett122798, on 08 October 2012 - 02:23 PM, said:

View PostPinkishu, on 08 October 2012 - 07:00 AM, said:

I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.

#10 Pinkishu

  • Members
  • 484 posts

Posted 08 October 2012 - 02:52 PM

View PostLyqyd, on 08 October 2012 - 02:51 PM, said:

View Postbrett122798, on 08 October 2012 - 02:23 PM, said:

View PostPinkishu, on 08 October 2012 - 07:00 AM, said:

I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.

Yeah, thats what she meant

#11 brett122798

  • Members
  • 300 posts
  • LocationIn the TARDIS at an unknown place in time.

Posted 08 October 2012 - 09:30 PM

View PostPinkishu, on 08 October 2012 - 02:52 PM, said:

View PostLyqyd, on 08 October 2012 - 02:51 PM, said:

View Postbrett122798, on 08 October 2012 - 02:23 PM, said:

View PostPinkishu, on 08 October 2012 - 07:00 AM, said:

I had that happen to me when I opened files in programs but didn't close them xD
I actually always have my programs open without conflict.

No, he means that this is what happens when you open a file handle in ComputerCraft and then don't close it.

Yeah, thats what she meant
1. lol

2. Oh, ok. Didn't read your post right.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users