# File lib/fsdb/util.rb, line 16
  def canonical(path)
    path = path.dup
    while path.gsub!(/[^\/]+\/+\.\.(?=\/)/, ""); end
    path.gsub!(/\/\/+/, "/")
    path.gsub!(/\/\.\//, "/")
    path.sub!(/^\/+/, "")
    path
  end