die with grace
This commit is contained in:
parent
081b2a02e2
commit
97a8b5ea28
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/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$
|
||||
|
||||
require 'date'
|
||||
|
|
@ -357,6 +357,10 @@ def check_ext(group, filename, mode)
|
|||
end
|
||||
|
||||
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
|
||||
begin
|
||||
file = File.new("#{tempdir}/#{name}", "w", "0644").close
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue