win32-file-stat 1.5.4 → 1.5.5
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 +4 -0
- data/lib/win32/file/stat.rb +9 -2
- data/test/test_file_stat.rb +1 -1
- data/win32-file-stat.gemspec +1 -1
- metadata +1 -1
- 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: aed3b9914cd40f5dccaa7162b3fcfcc7b980e6b5
|
4
|
+
data.tar.gz: 64a35c15ceaf8a729170453e3274bd6fcf9cbd3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b17ed41dcb2c5b68dfbad1b75c2e1cc4b061242610d9fd8caf26322d7d12dc3ca00a3d198f89e67d47b002a29ea45eb25204faa4637b26c5518ea7f6b4517b50
|
7
|
+
data.tar.gz: a35714c9ce26a8205df31d56c2959091ecb73d741d3f233ca651bfd33ab9de278f45c2e273fd791b21e06d8bce440e178eb9f95b17ba7171393c67c11daa6dd5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 1.5.5 - 7-Jun-2016
|
2
|
+
* Update to the internal get_current_process_sid method. No longer assumes
|
3
|
+
TOKEN_USER when reallocating a buffer.
|
4
|
+
|
1
5
|
== 1.5.4 - 7-Jun-2016
|
2
6
|
* It was possible that an internal FFI function (GetTokenInformation) could
|
3
7
|
fail if the buffer size wasn't large enough. That has been fixed. Thanks
|
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.5'
|
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
|
@@ -829,7 +829,14 @@ class File::Stat
|
|
829
829
|
info = FFI::MemoryPointer.new(rlength.read_ulong)
|
830
830
|
rlength.clear
|
831
831
|
bool = GetTokenInformation(token, token_type, info, info.size, rlength)
|
832
|
-
|
832
|
+
|
833
|
+
if bool
|
834
|
+
if token_type == TokenUser
|
835
|
+
info = TOKEN_USER.new(info)
|
836
|
+
else
|
837
|
+
info = TOKEN_GROUP.new(info)
|
838
|
+
end
|
839
|
+
end
|
833
840
|
end
|
834
841
|
|
835
842
|
raise SystemCallError.new('GetTokenInformation', FFI.errno) unless bool
|
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.5', 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
metadata.gz.sig
CHANGED
Binary file
|