diff --git a/telegram_upload/caption_formatter.py b/telegram_upload/caption_formatter.py index b7d4f221..ac8ab8c7 100644 --- a/telegram_upload/caption_formatter.py +++ b/telegram_upload/caption_formatter.py @@ -300,11 +300,7 @@ class FilePath(FileMixin, Path): def __new__(cls, *args, **kwargs): if cls is FilePath: cls = WindowsFilePath if os.name == 'nt' else PosixFilePath - self = cls._from_parts(args) - if not self._flavour.is_supported: - raise NotImplementedError("cannot instantiate %r on your system" - % (cls.__name__,)) - return self + return Path.__new__(cls, *args, **kwargs) class WindowsFilePath(FileMixin, WindowsPath):