win32-xpath 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +3 -0
- data/ext/win32/xpath.c +7 -3
- data/win32-xpath.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b9e865187d194c9db58257a0750bd60968ef2e5
|
4
|
+
data.tar.gz: 72fdc11d85bad1b62711fe69349eed0bf0ba4e43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77caf09f55a777500c810c2f533664e45282d396a627e1cf71097c061a2f9af3fd1c84c3c5b56c01fe8fbc32fb19999895a9817cedb44cc2bf5d95b8e4049c24
|
7
|
+
data.tar.gz: 7f8268eb83aac290fd6d99a935f43b973d4fedfd39fb7234f2a8059b3205e5254f69c8ad36c698b3417d56fd3bfd47e316c3a3d037062d70f3e4b25c872bccc6
|
data/CHANGES
CHANGED
data/ext/win32/xpath.c
CHANGED
@@ -4,6 +4,10 @@
|
|
4
4
|
#include <shlwapi.h>
|
5
5
|
#include <sddl.h>
|
6
6
|
|
7
|
+
#ifdef __MINGW32__
|
8
|
+
#define swprintf _snwprintf
|
9
|
+
#endif
|
10
|
+
|
7
11
|
#define MAX_WPATH MAX_PATH * sizeof(wchar_t)
|
8
12
|
|
9
13
|
// Equivalent to raise SystemCallError.new(string, errnum)
|
@@ -20,7 +24,7 @@ wchar_t* find_user(wchar_t* str){
|
|
20
24
|
LPWSTR str_sid;
|
21
25
|
LONG rv;
|
22
26
|
HKEY phkResult;
|
23
|
-
wchar_t subkey[
|
27
|
+
wchar_t subkey[MAX_WPATH];
|
24
28
|
wchar_t* lpData;
|
25
29
|
wchar_t* dom;
|
26
30
|
wchar_t* ptr;
|
@@ -56,7 +60,7 @@ wchar_t* find_user(wchar_t* str){
|
|
56
60
|
ruby_xfree(sid); // Don't need this any more
|
57
61
|
|
58
62
|
// Mash the stringified SID onto our base key
|
59
|
-
if(swprintf(subkey,
|
63
|
+
if(swprintf(subkey, MAX_WPATH, L"%s%s", key_base, str_sid) < 0)
|
60
64
|
rb_raise_syserr("swprintf", GetLastError());
|
61
65
|
|
62
66
|
// Get the key handle we need
|
@@ -105,7 +109,7 @@ wchar_t* expand_tilde(){
|
|
105
109
|
if(!size){
|
106
110
|
DWORD size2;
|
107
111
|
wchar_t* temp;
|
108
|
-
wchar_t* env2 = L"HOMEPATH";
|
112
|
+
const wchar_t* env2 = L"HOMEPATH";
|
109
113
|
env = L"HOMEDRIVE";
|
110
114
|
|
111
115
|
// If neither are found then raise an error
|
data/win32-xpath.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-xpath
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.4.
|
85
|
+
rubygems_version: 2.4.7
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Revamped File.expand_path for Windows
|