fix retry case for acquiring security descriptor

bug/bundler_fix
Brent Cook 2017-08-21 22:52:53 -05:00
parent 33f2ebc2aa
commit e3a9ddfc22
1 changed files with 1 additions and 1 deletions

View File

@ -311,7 +311,7 @@ module Accounts
if (f['return'] and f["lpnLengthNeeded"] <= buffer_size) if (f['return'] and f["lpnLengthNeeded"] <= buffer_size)
sd = f["pSecurityDescriptor"] sd = f["pSecurityDescriptor"]
elsif (f['GetLastError'] == 122) # ERROR_INSUFFICIENT_BUFFER elsif (f['GetLastError'] == 122) # ERROR_INSUFFICIENT_BUFFER
f = adv.GetFileSecurityA(dir, si, f["lpnLengthNeeded"], f["lpnLengthNeeded"], 4) sd = adv.GetFileSecurityA(dir, si, f["lpnLengthNeeded"], f["lpnLengthNeeded"], 4)
elsif (f['GetLastError'] == 2) elsif (f['GetLastError'] == 2)
vprint_error("The system cannot find the file specified: #{dir}") vprint_error("The system cannot find the file specified: #{dir}")
return nil return nil