diff --git a/lib/train/extras/file_windows.rb b/lib/train/extras/file_windows.rb index 2278628b..e276dad8 100644 --- a/lib/train/extras/file_windows.rb +++ b/lib/train/extras/file_windows.rb @@ -51,6 +51,13 @@ def mounted nil end + def owner + owner = @backend.run_command( + "Get-Acl '#{@spath}' | select -expand Owner").stdout.strip + return if owner.empty? + owner + end + def type if attributes.include?('Archive') return :file @@ -61,7 +68,7 @@ def type end %w{ - mode owner group uid gid mtime size selinux_label + mode group uid gid mtime size selinux_label }.each do |field| define_method field.to_sym do nil