[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

pstore not usable on read-only stores

From: Matt Armstrong <matt@...>
Date: 2003-01-03 23:30:23 UTC
List: ruby-core #679
It seems like it should be possible to use a PStore on a read-only
pstore in a read-only directory.  I ran into this when trying to
access one from a CGI script running as 'nobody'.


Index: pstore.rb
===================================================================
RCS file: /src/ruby/lib/pstore.rb,v
retrieving revision 1.16
diff -u -r1.16 pstore.rb
--- pstore.rb	14 Nov 2002 06:18:59 -0000	1.16
+++ pstore.rb	3 Jan 2003 23:28:58 -0000
@@ -24,9 +24,6 @@
     unless File::directory? dir
       raise PStore::Error, format("directory %s does not exist", dir)
     end
-    unless File::writable? dir
-      raise PStore::Error, format("directory %s not writable", dir)
-    end
     if File::exist? file and not File::readable? file
       raise PStore::Error, format("file %s not readable", file)
     end
@@ -93,7 +90,7 @@
       value = nil
       backup = @filename+"~"
       begin
-	file = File::open(@filename, "rb+")
+	file = File::open(@filename, read_only ? "rb" : "rb+")
 	orig = true
       rescue Errno::ENOENT
 	raise if read_only


In This Thread

Prev Next