whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: only the basename is needed
Date Sun, 04 Jun 2017 23:42:18 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  fc536af   only the basename is needed
fc536af is described below

commit fc536afe9b17f44e47da8a4a02cdf09a423918ed
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Sun Jun 4 19:40:35 2017 -0400

    only the basename is needed
---
 tools/site-scan.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/site-scan.rb b/tools/site-scan.rb
index c883904..2b272ec 100755
--- a/tools/site-scan.rb
+++ b/tools/site-scan.rb
@@ -221,7 +221,8 @@ def parse(id, site, name)
 
   # see if image has been uploaded
   if IMAGE_DIR
-    data[:image] = Dir["#{IMAGE_DIR}/#{id}.*"].first
+    data[:image] = Dir["#{IMAGE_DIR}/#{id}.*"].
+      map {|path| File.basename(path)}.first
   end
 
   return data

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message