NIHVIVO-241 tweak the file handling, expanding paths properly.
This commit is contained in:
parent
ff36a1b06d
commit
f43164e0f0
1 changed files with 6 additions and 6 deletions
|
@ -30,7 +30,7 @@ class Licenser
|
|||
base = File.dirname(properties['properties_file_path'])
|
||||
|
||||
return nil if path == nil
|
||||
return path if Pathname.new(path).absolute?
|
||||
return File.expand_path(path) if Pathname.new(path).absolute?
|
||||
return File.expand_path(File.join(base, path))
|
||||
end
|
||||
|
||||
|
@ -126,7 +126,7 @@ class Licenser
|
|||
def scan_dir(source_dir, target_dir)
|
||||
@stats.enter_directory(source_dir)
|
||||
|
||||
Dir.mkdir(File.join(@target_dir, target_dir)) if !@scan_only
|
||||
Dir.mkdir(File.expand_path(target_dir, @target_dir)) if !@scan_only
|
||||
|
||||
Dir.foreach(File.join(@source_dir, source_dir)) do |filename|
|
||||
source_path_relative = File.join(source_dir, filename)
|
||||
|
|
Loading…
Add table
Reference in a new issue