Skip to content

Commit

Permalink
make rubocop happy
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Feb 11, 2015
1 parent 86faf4b commit c4ac7eb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions library/types/src/modules/String.rb
Expand Up @@ -724,9 +724,7 @@ def FormatFilename(file_path, len)
file = dir.pop

# there is a slash at the end, add the directory name
if file == ""
file = dir.pop + "/"
end
file = dir.pop + "/" if file == ""

if dir.join("/").size <= 3
# the path is short, replacing by ... cannot help
Expand All @@ -738,7 +736,7 @@ def FormatFilename(file_path, len)
# ellipsis - used to replace part of text to make it shorter
# example: "/really/very/long/file/name", "/.../file/name")
ellipsis = _("...")
dir[dir.size/2] = ellipsis
dir[dir.size / 2] = ellipsis

ret = (dir + [file]).join("/")

Expand Down

0 comments on commit c4ac7eb

Please sign in to comment.