From 02a8d06fa8833db3c266663f31a82deb6e89b2d9 Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 19 Dec 2002 20:56:37 +0000 Subject: Improve. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/trojan.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sample/trojan.rb') diff --git a/sample/trojan.rb b/sample/trojan.rb index 6e9b18f502..3a35ac21c2 100644 --- a/sample/trojan.rb +++ b/sample/trojan.rb @@ -5,7 +5,7 @@ path = ENV['PATH'].split(File::PATH_SEPARATOR) for dir in path if File.directory?(dir) for f in d = Dir.open(dir) - fpath = dir+"/"+f + fpath = File.join(dir, f) if File.file?(fpath) && (File.stat(fpath).mode & 022) != 0 printf("file %s is writable from other users\n", fpath) end -- cgit v1.2.3