diff --git a/lib/ftpd/disk_file_system.rb b/lib/ftpd/disk_file_system.rb index 7592be9..5ba251c 100644 --- a/lib/ftpd/disk_file_system.rb +++ b/lib/ftpd/disk_file_system.rb @@ -15,6 +15,9 @@ module PathExpansion # data_dir should be an absolute path. def set_data_dir(data_dir) + # ensure that the path always has a trailing '/' character to deal with + # issue 42. + data_dir << '/' unless data_dir.end_with?('/') @data_dir = data_dir end