Preliminary fix per code review [skip ci]

This commit is contained in:
Ryan Lue 2018-08-22 10:51:41 +08:00 committed by Ryan Lue
parent 7d63868996
commit 5888f1ba44

View file

@ -43,7 +43,7 @@ module Import
end
def display_path(folder)
display_name = folder.display_name.utf8_encode(fallback: :read_as_sanitized_binary)
display_name = folder.display_name.utf8_encode
parent_folder = find(folder.parent_folder_id)
return display_name if parent_folder.blank?
@ -51,6 +51,8 @@ module Import
"#{display_path(parent_folder)} -> #{display_name}"
rescue Viewpoint::EWS::EwsError
display_name
rescue EncodingError
'(undetectable encoding)'
end
private