From ce8492069a8e2c6ec5fd349e803b01ffce0c38c1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Sun, 15 Jul 2018 09:53:22 +0200 Subject: [PATCH] Correcting mime detection behavior on windows plateform --- src/daComposant/daCore/Interfaces.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/daComposant/daCore/Interfaces.py b/src/daComposant/daCore/Interfaces.py index 76aea88..7737fa0 100644 --- a/src/daComposant/daCore/Interfaces.py +++ b/src/daComposant/daCore/Interfaces.py @@ -559,6 +559,10 @@ class ImportDetector(object): # mimetypes.add_type('application/numpy.npy', '.npy') mimetypes.add_type('application/numpy.npz', '.npz') + if sys.platform.startswith("win"): + mimetypes.add_type('text/plain', '.txt') + mimetypes.add_type('text/csv', '.csv') + mimetypes.add_type('text/tab-separated-values', '.tsv') # # File related f # ------------------ -- 2.39.2