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/11 12:32:25 UTC
[whimsy] branch master updated: Avoid unnecessary crashes
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 6a09184 Avoid unnecessary crashes
6a09184 is described below
commit 6a0918451ab8987a452c73ad9751354c3a4b8303
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 11 13:32:16 2020 +0100
Avoid unnecessary crashes
---
lib/whimsy/asf/documents.rb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/whimsy/asf/documents.rb b/lib/whimsy/asf/documents.rb
index 372dbfb..dad6a75 100644
--- a/lib/whimsy/asf/documents.rb
+++ b/lib/whimsy/asf/documents.rb
@@ -129,6 +129,7 @@ module ASF
# param fileurl the svn url of the complete file
# return the file name or nil if the file is not in the directory
def self.extractfilenamefrom(rooturl,fileurl)
+ return nil unless fileurl
# does the root match the file url?
index = fileurl.index(rooturl)
if (index == 0)
@@ -139,6 +140,7 @@ module ASF
# Extract the file name if it is in emeritus directory
# nil if it is not in this directory
def self.extractfilename(fileurl)
+ return nil unless fileurl
root_url = ASF::SVN.svnurl('emeritus') + '/'
extractfilenamefrom(root_url, fileurl)
end