win32-file-stat 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +6 -0
- data/MANIFEST +3 -1
- data/README +1 -1
- data/appveyor.yml +48 -0
- data/lib/win32/file/stat.rb +15 -8
- data/lib/win32/file/windows/structs.rb +6 -0
- data/test/test_file_stat.rb +1 -1
- data/win32-file-stat.gemspec +1 -1
- metadata +3 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23250fff2376ccd7a6065cdcae48c6e81c07df90
|
4
|
+
data.tar.gz: a9a131d44a673112885963b6d29073ad92c11d48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f891648fed03bc03c47810ba2e556d24cb1575791dcc4c305ce704cc9495f8116fd22d7e16c382af8cb537ff9f7302628bf5828604fd0168c5a89cdcf58d431
|
7
|
+
data.tar.gz: a493ed6f9733b4cd62e23918bc6dfa495666c42b9fc47044198ab46e498341da68cf4576aa60ff63872c402bd404db23a9af570c58119d4412a4de816b1022cd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 1.5.4 - 7-Jun-2016
|
2
|
+
* It was possible that an internal FFI function (GetTokenInformation) could
|
3
|
+
fail if the buffer size wasn't large enough. That has been fixed. Thanks
|
4
|
+
go to ferfebles and Michael Lowell Roberts for the spot.
|
5
|
+
* Added an appveyor.yml file.
|
6
|
+
|
1
7
|
== 1.5.3 - 25-May-2016
|
2
8
|
* This gem is now signed.
|
3
9
|
* The local helper file has been replaced by ffi-win32-extensions, which
|
data/MANIFEST
CHANGED
data/README
CHANGED
data/appveyor.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
version: '{build}'
|
2
|
+
branches:
|
3
|
+
only:
|
4
|
+
- ffi2
|
5
|
+
skip_tags: true
|
6
|
+
clone_depth: 10
|
7
|
+
environment:
|
8
|
+
matrix:
|
9
|
+
- ruby_version: 193
|
10
|
+
ruby_dir: 1.9.1
|
11
|
+
- ruby_version: 200
|
12
|
+
ruby_dir: 2.0.0
|
13
|
+
- ruby_version: 200-x64
|
14
|
+
ruby_dir: 2.0.0
|
15
|
+
- ruby_version: 21
|
16
|
+
ruby_dir: 2.1.0
|
17
|
+
- ruby_version: 21-x64
|
18
|
+
ruby_dir: 2.1.0
|
19
|
+
- ruby_version: 22
|
20
|
+
ruby_dir: 2.2.0
|
21
|
+
- ruby_version: 22-x64
|
22
|
+
ruby_dir: 2.2.0
|
23
|
+
install:
|
24
|
+
- ps: >-
|
25
|
+
$env:path = "C:\Ruby" + $env:ruby_version + "\bin;" + $env:path
|
26
|
+
|
27
|
+
$tpath = "C:\Ruby" + $env:ruby_version + "\lib\ruby\" + $env:ruby_dir + "\test"
|
28
|
+
|
29
|
+
if ((test-path $tpath) -eq $True){ rm -recurse -force $tpath }
|
30
|
+
|
31
|
+
gem update --system > $null
|
32
|
+
|
33
|
+
if ((gem query -i ffi-win32-extensions) -eq $False){ gem install ffi-win32-extensions --no-document }
|
34
|
+
|
35
|
+
if ((gem query -i win32-security) -eq $False){ gem install win32-security --no-document }
|
36
|
+
|
37
|
+
if ((gem query -i test-unit -v ">= 3.0") -eq $False){ gem install test-unit --no-document }
|
38
|
+
cache:
|
39
|
+
- C:\Ruby193\lib\ruby\gems\1.9.1
|
40
|
+
- C:\Ruby200\lib\ruby\gems\2.0.0
|
41
|
+
- C:\Ruby200-x64\lib\ruby\gems\2.0.0
|
42
|
+
- C:\Ruby21\lib\ruby\gems\2.1.0
|
43
|
+
- C:\Ruby21-x64\lib\ruby\gems\2.1.0
|
44
|
+
- C:\Ruby22\lib\ruby\gems\2.2.0
|
45
|
+
- C:\Ruby22-x64\lib\ruby\gems\2.2.0
|
46
|
+
build: off
|
47
|
+
test_script:
|
48
|
+
- cmd: rake
|
data/lib/win32/file/stat.rb
CHANGED
@@ -58,7 +58,7 @@ class File::Stat
|
|
58
58
|
attr_reader :streams
|
59
59
|
|
60
60
|
# The version of the win32-file-stat library
|
61
|
-
WIN32_FILE_STAT_VERSION = '1.5.
|
61
|
+
WIN32_FILE_STAT_VERSION = '1.5.4'
|
62
62
|
|
63
63
|
# Creates and returns a File::Stat object, which encapsulate common status
|
64
64
|
# information for File objects on MS Windows sytems. The information is
|
@@ -815,22 +815,29 @@ class File::Stat
|
|
815
815
|
|
816
816
|
begin
|
817
817
|
token = token.read_pointer.to_i
|
818
|
-
rlength = FFI::MemoryPointer.new(:
|
818
|
+
rlength = FFI::MemoryPointer.new(:ulong)
|
819
819
|
|
820
820
|
if token_type == TokenUser
|
821
|
-
|
821
|
+
info = TOKEN_USER.new
|
822
822
|
else
|
823
|
-
|
823
|
+
info = TOKEN_GROUP.new
|
824
824
|
end
|
825
825
|
|
826
|
-
|
827
|
-
|
826
|
+
bool = GetTokenInformation(token, token_type, info, info.size, rlength)
|
827
|
+
|
828
|
+
if !bool && FFI.errno == ERROR_INSUFFICIENT_BUFFER
|
829
|
+
info = FFI::MemoryPointer.new(rlength.read_ulong)
|
830
|
+
rlength.clear
|
831
|
+
bool = GetTokenInformation(token, token_type, info, info.size, rlength)
|
832
|
+
info = TOKEN_USER.new(info) if bool
|
828
833
|
end
|
829
834
|
|
835
|
+
raise SystemCallError.new('GetTokenInformation', FFI.errno) unless bool
|
836
|
+
|
830
837
|
if token_type == TokenUser
|
831
|
-
tsid =
|
838
|
+
tsid = info[:User][:Sid]
|
832
839
|
else
|
833
|
-
tsid =
|
840
|
+
tsid = info[:Groups][0][:Sid]
|
834
841
|
end
|
835
842
|
|
836
843
|
ptr = FFI::MemoryPointer.new(:string)
|
data/test/test_file_stat.rb
CHANGED
@@ -54,7 +54,7 @@ class TC_Win32_File_Stat < Test::Unit::TestCase
|
|
54
54
|
end
|
55
55
|
|
56
56
|
test "version is set to expected value" do
|
57
|
-
assert_equal('1.5.
|
57
|
+
assert_equal('1.5.4', File::Stat::WIN32_FILE_STAT_VERSION)
|
58
58
|
end
|
59
59
|
|
60
60
|
test "constructor does not modify argument" do
|
data/win32-file-stat.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-file-stat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
|
32
32
|
tGSHgAmcLlkdGgan182qsE/4kKM=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-
|
34
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: ffi
|
@@ -117,6 +117,7 @@ extra_rdoc_files:
|
|
117
117
|
- CHANGES
|
118
118
|
- MANIFEST
|
119
119
|
files:
|
120
|
+
- appveyor.yml
|
120
121
|
- certs
|
121
122
|
- certs/djberg96_pub.pem
|
122
123
|
- CHANGES
|
metadata.gz.sig
CHANGED
Binary file
|