die with grace
This commit is contained in:
parent
081b2a02e2
commit
97a8b5ea28
2 changed files with 7 additions and 2 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
# $Dwarf: CHANGELOG,v 1.18 2003/04/24 07:48:48 ward Exp $
|
# $Dwarf: CHANGELOG,v 1.19 2003/04/24 09:44:25 ward Exp $
|
||||||
# $Source$
|
# $Source$
|
||||||
|
|
||||||
from 0.2.0 to 0.2.1
|
from 0.2.0 to 0.2.1
|
||||||
- fail gracefully at a lack of configuration
|
- fail gracefully at a lack of configuration
|
||||||
|
- fail gracefully if tempdir doesn't exist or isn't writable
|
||||||
|
|
||||||
from 0.1.0 to 0.2.0
|
from 0.1.0 to 0.2.0
|
||||||
- fix extension enforcing
|
- fix extension enforcing
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/local/bin/ruby -w
|
#!/usr/local/bin/ruby -w
|
||||||
|
|
||||||
# $Dwarf: ripnews.rb,v 1.50 2003/04/22 21:30:06 ward Exp $
|
# $Dwarf: ripnews.rb,v 1.51 2003/04/24 09:41:17 ward Exp $
|
||||||
# $Source$
|
# $Source$
|
||||||
|
|
||||||
require 'date'
|
require 'date'
|
||||||
|
|
@ -357,6 +357,10 @@ def check_ext(group, filename, mode)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_max_file_length(tempdir=".")
|
def get_max_file_length(tempdir=".")
|
||||||
|
if ! FileTest.directory?("#{tempdir}") || ! FileTest.writable?("#{tempdir}")
|
||||||
|
print "Tempdir '#{tempdir}' is not a writable directory\n"
|
||||||
|
exit
|
||||||
|
end
|
||||||
name = "a"*500
|
name = "a"*500
|
||||||
begin
|
begin
|
||||||
file = File.new("#{tempdir}/#{name}", "w", "0644").close
|
file = File.new("#{tempdir}/#{name}", "w", "0644").close
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue