Skip to content

Commit cf4aa9c

Browse files
committed
Fix dockerignore exclusion logic on Windows
Signed-off-by: Joffrey F <[email protected]>
1 parent 8975851 commit cf4aa9c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docker/utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ def match_path(path, pattern):
194194
if pattern:
195195
pattern = os.path.relpath(pattern)
196196

197-
pattern_components = pattern.split('/')
198-
path_components = path.split('/')[:len(pattern_components)]
197+
pattern_components = pattern.split(os.path.sep)
198+
path_components = path.split(os.path.sep)[:len(pattern_components)]
199199
return fnmatch('/'.join(path_components), pattern)
200200

201201

tests/integration/container_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ def setUp(self):
415415
['touch', os.path.join(self.mount_dest, self.filename)],
416416
)
417417

418+
@pytest.mark.xfail(
419+
IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform'
420+
)
418421
def test_create_with_binds_rw(self):
419422

420423
container = self.run_with_volume(
@@ -430,6 +433,9 @@ def test_create_with_binds_rw(self):
430433
inspect_data = self.client.inspect_container(container)
431434
self.check_container_data(inspect_data, True)
432435

436+
@pytest.mark.xfail(
437+
IS_WINDOWS_PLATFORM, reason='Test not designed for Windows platform'
438+
)
433439
def test_create_with_binds_ro(self):
434440
self.run_with_volume(
435441
False,

0 commit comments

Comments
 (0)