From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3978F42F39 for ; Mon, 16 May 2022 08:34:13 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B874A68B3C5; Mon, 16 May 2022 11:34:10 +0300 (EEST) Received: from msg-6.mailo.com (ip-16.mailobj.net [213.182.54.16]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3A1D268A8A5 for ; Mon, 16 May 2022 11:34:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1652690043; bh=XcH4V6gXDJz+fi2XOW14OZqpbiIlf3zIbrLbN8EWsgg=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Yd8Z0xB9CxL+WHz/jCD5BJWAus1j1TkucGnnRBVISXEhYob4W3001k+6wUmWet6d0 B+sgoNKrYkI1ZQRlc1mOqPTiFqPNupoMAk1CfjmsQMqMsfw17YrkFYfBreN+UaYH+f Voy4k/UlfD0lHAgWEukoeQeXlJFIpUPz+M/IWLjA= Received: by www-7.mailo.com with http webmail; Mon, 16 May 2022 10:34:03 +0200 (CEST) X-EA-Auth: wvHPJQUMJJx0rTAF4Cn4raQmc9zsSBzF9eEgCeb62XAqpRwsdP3Je9MJGoBWfbQK1nw3dOmyH4KqLXsBjBUrIhs7nLzOWAxH From: nil-admirari@mailo.com To: ffmpeg-devel@ffmpeg.org Date: Mon, 16 May 2022 10:34:03 +0200 (CEST) X-Priority: 3 MIME-Version: 1.0 X-Mailer: COMS/EA21.01/r20220415 Message-ID: In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 1/2] avutil/wchar_filename, file_open: Support long file names on Windows X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > The functions are needed in both. file_open.c cannot be included > in libavformat/os_support.h and neither the other way round, > so they need to be in a 3rd place. How about renaming > wchar_filename.h to windows_filename.h ? Probably it's better to rename. > I have skipped those checks because we won't have partially qualified > paths at this point (due to having called GetFullPathNameW) and > device paths are not allowed to be longer than 260, so this it might > happen that the UNC prefix gets added, but only when it's a long > path which doesn't work anyway (I've tested those cases). I think it's better to test for \\.\ explicitly in path_is_extended: 1. It's not obvious that \\.\ aren't allowed to be long. 2. Probably FFmpeg is not going to have a longPathAware manifest, but it can be linked with an EXE with such a manifest. Would MAX_PATH restriction still apply? You have the checks inside of get_extended_win32_path and none inside of add_extended_prefix. Yet add_extended_prefix can be called by anyone: it's not private. Thus add_extended_prefix either should be inlined, or it should have the necessary checks in place. Otherwise you end up with an API that's easy to use incorrectly and hard to use correctly, and it should be the other way around. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".