module DEBUGGER__

def self.check_dir_authority path

def self.check_dir_authority path
  fs = File.stat(path)
  unless (dir_uid = fs.uid) == (uid = Process.uid)
    raise "#{path} uid is #{dir_uid}, but Process.uid is #{uid}"
  end
  if fs.world_writable? && !fs.sticky?
    raise "#{path} is world writable but not sticky"
  end
  path
end