summaryrefslogtreecommitdiff
path: root/lib/ftools.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftools.rb')
-rw-r--r--lib/ftools.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/ftools.rb b/lib/ftools.rb
index 5e6203b1a3..4047a595eb 100644
--- a/lib/ftools.rb
+++ b/lib/ftools.rb
@@ -4,12 +4,7 @@ class << File
def catname from, to
if FileTest.directory? to
- to +
- if to =~ /\\/
- if to[-1,1] != '\\' then '\\' end + basename(from)
- else
- if to[-1,1] != '/' then '/' end + basename(from)
- end
+ File.join to.sub(%r([/\\]$), ''), basename(from)
else
to
end