Skip to content

Commit

Permalink
Fix issue caused by missing source file in add call
Browse files Browse the repository at this point in the history
Changes to EvmDatabaseOps for PR ManageIQ/manageiq#17689
will require that the session add method be called on all sessions.  This allows
us to fail gracefully.
  • Loading branch information
jerryk55 committed Aug 1, 2018
1 parent c505ace commit b17c12c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/gems/pending/util/mount/miq_generic_mount_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def add(source, dest_uri)
logger.info("#{log_header} Skipping add since URI: [#{dest_uri}] already exists")
return dest_uri
end
unless File.exist?(source)
logger.info("#{log_header} Skipping add since file: [#{source}] does not exist")
return source
end

logger.info("#{log_header} Building relative path: [#{relpath}]...")
FileUtils.mkdir_p(File.dirname(relpath))
Expand Down

0 comments on commit b17c12c

Please sign in to comment.