You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/07 20:42:39 UTC
[whimsy] branch master updated: Simpler check
This is an automated email from the ASF dual-hosted git repository.
sebb 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 18a2b56 Simpler check
18a2b56 is described below
commit 18a2b562ccb8cd32c246a2c621756b98718c0174
Author: Sebb <se...@apache.org>
AuthorDate: Tue Jul 7 21:42:29 2020 +0100
Simpler check
---
lib/whimsy/asf/svn.rb | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/whimsy/asf/svn.rb b/lib/whimsy/asf/svn.rb
index ffdafb7..9a78e33 100644
--- a/lib/whimsy/asf/svn.rb
+++ b/lib/whimsy/asf/svn.rb
@@ -782,8 +782,7 @@ module ASF
else
uri = URI.parse(path)
# allow file: URIs for local testing
- isFile = (uri.is_a? URI::File rescue false) # URI::File is not in 2.3.1
- if isFile or uri.is_a? URI::HTTPS # includes HTTPS
+ if %w(http https file).include? uri.scheme
basename = File.basename(uri.path).untaint
parentdir = File.dirname(uri.path).untaint
uri.path = parentdir