Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions gopher2redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
# -------------------------------------------------------------------------------
#
# Copyright 2019 Salvatore Sanfilippo <antirez@gmail.com>
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Expand Down Expand Up @@ -94,6 +94,7 @@ def parse_options
# At the same time, as a side effect, writes the key that will represent
# such file on Redis.
def file2keys(r,selector,title,filename,type,localhost,localport)
selector = selector.delete_suffix('/')
type = "" if !type
if ['zip','bin','gz','tgz','o'].member?(type)
type = '9'
Expand Down