Method: Train::File::Remote::Windows#sanitize_filename

Defined in:
lib/train/file/remote/windows.rb

#sanitize_filename(path) ⇒ Object

Ensures we do not use invalid characters for file names



10
11
12
13
14
15
# File 'lib/train/file/remote/windows.rb', line 10

def sanitize_filename(path)
  return if path.nil?

  # we do not filter :, backslash and forward slash, since they are part of the path
  @spath = path.gsub(/[<>"|?*]/, "")
end