diff options
| author | George Roman <george.roman.99@gmail.com> | 2018-07-07 16:23:07 +0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-16 20:34:30 -0300 |
| commit | 1b3b6525a4313404af84fce0fbbc29695e664f73 (patch) | |
| tree | 76ad679d512e216ace739662ac60d1785d43af2c /spec | |
| parent | f2772aee0d4ee5012d9b1be65f685b535d7380bd (diff) | |
| download | luarocks-1b3b6525a4313404af84fce0fbbc29695e664f73.tar.gz luarocks-1b3b6525a4313404af84fce0fbbc29695e664f73.tar.bz2 luarocks-1b3b6525a4313404af84fce0fbbc29695e664f73.zip | |
Update the behavior of fs.set_permissions on Windows
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/fs_spec.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index 3b4e6bac..eb8425e2 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua | |||
| @@ -31,7 +31,7 @@ describe("Luarocks fs test #unit", function() | |||
| 31 | 31 | ||
| 32 | local make_unreadable = function(path) | 32 | local make_unreadable = function(path) |
| 33 | if is_win then | 33 | if is_win then |
| 34 | fs.execute("icacls " .. fs.Q(path) .. " /deny %USERNAME%:(RD)") | 34 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(R)") |
| 35 | else | 35 | else |
| 36 | fs.execute("chmod -r " .. fs.Q(path)) | 36 | fs.execute("chmod -r " .. fs.Q(path)) |
| 37 | end | 37 | end |
| @@ -39,7 +39,7 @@ describe("Luarocks fs test #unit", function() | |||
| 39 | 39 | ||
| 40 | local make_unwritable = function(path) | 40 | local make_unwritable = function(path) |
| 41 | if is_win then | 41 | if is_win then |
| 42 | fs.execute("icacls " .. fs.Q(path) .. " /deny %USERNAME%:(WD,AD)") | 42 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(W,M)") |
| 43 | else | 43 | else |
| 44 | fs.execute("chmod -w " .. fs.Q(path)) | 44 | fs.execute("chmod -w " .. fs.Q(path)) |
| 45 | end | 45 | end |
| @@ -47,12 +47,12 @@ describe("Luarocks fs test #unit", function() | |||
| 47 | 47 | ||
| 48 | local make_unexecutable = function(path) | 48 | local make_unexecutable = function(path) |
| 49 | if is_win then | 49 | if is_win then |
| 50 | fs.execute("icacls " .. fs.Q(path) .. " /deny %USERNAME%:(X)") | 50 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(X)") |
| 51 | else | 51 | else |
| 52 | fs.execute("chmod -x " .. fs.Q(path)) | 52 | fs.execute("chmod -x " .. fs.Q(path)) |
| 53 | end | 53 | end |
| 54 | end | 54 | end |
| 55 | 55 | ||
| 56 | local runner | 56 | local runner |
| 57 | 57 | ||
| 58 | setup(function() | 58 | setup(function() |
