lib/eco/api/common/session/file_manager.rb in eco-helpers-2.7.22 vs lib/eco/api/common/session/file_manager.rb in eco-helpers-2.7.23
- old
+ new
@@ -15,14 +15,14 @@
@timestamp_pattern = init.files.timestamp_pattern || DEFAULT_TIMESTAMP_PATTERN
self.dir_path = init.working_directory || Dir.pwd
end
def dir_path=(value)
- @dir = Eco::Data::Files::Directory.new(value)
+ @dir = Eco::Data::Files::Directory.new(value)
@dir_path = @dir.create
- rescue StandardError => e
- logger.error("could not create or make any sense of directory '#{value}': #{e.to_s}")
+ rescue StandardError => err
+ logger.error("could not create or make any sense of directory '#{value}': #{err}")
end
def logger
@enviro&.logger || ::Logger.new(IO::NULL)
end
@@ -121,10 +121,11 @@
file
end
def filename_for(filename, modifier = :no_stamp)
file = dir.file(filename)
- FileManager.timestamp_file(file) if modifier == :timestamp
+ file = FileManager.timestamp_file(file) if modifier == :timestamp
+ file
end
end
end
end
end