Hi,
Sorry for these dumb questions but I am really off when it comes to doing anything with win32.
So, the thing is that I have a function that creates a temp file, then does something with it and deletes it. I am doing this with
File.delete(temp_filename)
On linux this script runs without any problems, however under windows I am getting 'Permission denied (Errno::EACCESS).
Since the file is unquestionably deletable, I think maybe windows locks it for whatever reason (or maybe not) - am I doing something wrong, or if not, is there a workaround for this?
Thanks,
Peter
···
__
http://www.rubyrailways.com
Hi,
Sorry for these dumb questions but I am really off when it comes to
doing anything with win32.
So, the thing is that I have a function that creates a temp file, then
does something with it and deletes it. I am doing this with
File.delete(temp_filename)
On linux this script runs without any problems, however under windows I
am getting 'Permission denied (Errno::EACCESS).
Since the file is unquestionably deletable, I think maybe windows locks
it for whatever reason (or maybe not) - am I doing something wrong, or
if not, is there a workaround for this?
Did you #close the file before you tried to delete it?
···
On Sun, Feb 04, 2007 at 05:59:48AM +0900, Peter Szinek wrote:
Thanks,
Peter
__
http://www.rubyrailways.com
gem install linux ??
peter@brain:~$ sudo gem install linux
Password:
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find linux (> 0) in the repository
Ok, now seriously: I am doing this just to make sure that the gem I am going to release runs on win32, too. I have a heap of blackbox tests which I am using besides unit tests to make sure things are working properly. All I want is to run these tests on win, then go back to my ubuntu box.
Peter
···
__
http://www.rubyrailways.com
Did you #close the file before you tried to delete it?
Yep. This does not help...
Here is a similar (or maybe) identical question (I did not find the answer to it):
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/123985
Peter
···
__
http://www.rubyrailways.com
Have you tried using Tempfile instead? Or would Tempfile not fit your
needs? Or is Tempfile doing the same thing?
···
On Feb 3, 2:30 pm, Peter Szinek <p...@rubyrailways.com> wrote:
> Did you #close the file before you tried to delete it?
Yep. This does not help...
Here is a similar (or maybe) identical question (I did not find the
answer to it):
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/123985
Peter
__http://www.rubyrailways.com
Have you tried using Tempfile instead? Or would Tempfile not fit your
needs? Or is Tempfile doing the same thing?
Thanks for the tip! I will try it with a Temofile now and let's see.
Cheers,
Peter
···
__
http://www.rubyrailways.com