Skip to content

Commit b8ef72f

Browse files
committed
io: Apply double extensions workaround for Windows too
1 parent e0221c5 commit b8ef72f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Orange/data/io.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,14 @@ def __new__(cls, name, bases, attrs):
297297
for compression in Compression.all:
298298
for ext in newcls.EXTENSIONS:
299299
new_extensions.append(ext + compression)
300-
# OSX file dialog doesn't support filtering on double
301-
# extensions (e.g. .csv.gz)
302-
# https://bugreports.qt.io/browse/QTBUG-38303
303-
# This is just here for OWFile that gets QFileDialog
304-
# filters from FileFormat.readers.keys()
305-
if sys.platform == 'darwin':
300+
if sys.platform in ('darwin', 'win32'):
301+
# OSX file dialog doesn't support filtering on double
302+
# extensions (e.g. .csv.gz)
303+
# https://bugreports.qt.io/browse/QTBUG-38303
304+
# This is just here for OWFile that gets QFileDialog
305+
# filters from FileFormat.readers.keys()
306+
# EDIT: Windows exhibit similar problems:
307+
# while .tab.gz works, .tab.xz and .tab.bz2 do not!
306308
new_extensions.append(compression)
307309
newcls.EXTENSIONS = tuple(new_extensions)
308310

0 commit comments

Comments
 (0)