Skip to content

Commit

Permalink
change birthtime to ctime
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxdrorange committed Sep 12, 2024
1 parent c523bb9 commit f7cd728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/vault_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def action_enable
# if /var/log/vault exists and is not a link, move to /var/log/vault.[created_at timestamp]
path = '/var/log/vault'
if ::File.directory?(path) && !::File.symlink?(path)
created_at = ::File.birthtime(path).strftime('%Y%m%d%H%M%S')
created_at = ::File.ctime(path).strftime('%Y%m%d%H%M%S')
new_path = "#{path}.#{created_at}"
::FileUtils.mv(path, new_path)
end
Expand Down

0 comments on commit f7cd728

Please sign in to comment.