Skip to content

Commit

Permalink
Update from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jul 4, 2019
1 parent bcf728d commit 338f6bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/desktop/src/modules/Desktop.rb
Expand Up @@ -417,8 +417,12 @@ def ParseSingleDesktopFile(file)
def desktop_file_to_module(filename)
basename = File.basename(filename)
name = basename[FILE_REGEXP, 1]
return if name.nil?
if name.nil?
log.info "Could not infer the module name from #{filename}"
return
end

# E.g. 'AddOn' to 'add-on'
name.gsub(/([[:lower:]])([[:upper:]]+)/, '\1-\2').downcase
end
end
Expand Down

0 comments on commit 338f6bd

Please sign in to comment.