From: David Disseldorp <ddiss@suse.de>
To: "Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp\"
<Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>"@imap2.suse-dmz.suse.de
Cc: 'Vasant Karasulli' <vkarasulli@suse.de>,
'Sungjong Seo' <sj1557.seo@samsung.com>,
"'linux-fsdevel@vger.kernel.org'" <linux-fsdevel@vger.kernel.org>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
'Takashi Iwai' <tiwai@suse.de>,
'Namjae Jeon' <linkinjeon@kernel.org>
Subject: Re: [PATCH v2 2/2] exfat currently unconditionally strips trailing periods '.' when performing path lookup, but allows them in the filenames during file creation. This is done intentionally, loosely following Windows behaviour and specifications which ...
Date: Wed, 16 Mar 2022 14:45:46 +0100 [thread overview]
Message-ID: <20220316144546.2da266c3@suse.de> (raw)
In-Reply-To: <TYAPR01MB535314A6E1FB0CB1BAD621C2900F9@TYAPR01MB5353.jpnprd01.prod.outlook.com>
Hi T.Kohada,
On Mon, 14 Mar 2022 03:52:08 +0000, Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp wrote:
> Hi, Vasant Karasulli.
>
> > > > I think it makes sense to mention your findings from the Windows
> > > > tests here. E.g. "Windows 10 also retains leading and trailing space
> > > > characters".
> > > Windows 10 do also strip them. So you can make another patch to strip
> > > it as well as trailing periods.
> > Actually I found contradicting behavior between Window 10 File Explorer and Commandline. Commandline seems to strip
> > trailing spaces, but File Explorer doesn't.
>
> The exfat specification specifies an invalid character set, but there are no restrictions on the use of leading or trailing white-space or dots.
> Even if the filename has trailing-dot as shown below, it conforms to the exfat specification and can be created on Windows.
> "a"
> "a."
> "a.."
> These are treated as "a" in the current implementation of linix-exfat, so the intended file cannot be accessed.
> The specified filename should not be modified to comply with the exfat specification.
> Therefore, exfat_striptail_len() should not be used.
>
> Note:
> Windows explorer removes trailing white-space and dots, but not the behavior of the filesystem.
> Also, you can create a trailing-dot filename by quoting it on the command line.
Please explain how you came to that conclusion.
I did some further tests using the win32 CopyFile() API directly[1] on
Windows10 and observe that both trailing periods and trailing spaces are
trimmed for an exfat destination path.
Cheers, David
1: calling win32 CopyFile() from powershell
https://devblogs.microsoft.com/scripting/use-powershell-to-interact-with-the-windows-api-part-1/
next prev parent reply other threads:[~2022-03-16 13:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 14:24 [PATCH v2 0/2] exfat: allow access to paths with trailing dots Vasant Karasulli
2022-03-10 14:24 ` [PATCH v2 1/2] The "keep_last_dots" mount option will, in a subsequent commit, control whether or not trailing periods '.' are stripped from path components during file lookup or file creation Vasant Karasulli
2022-03-10 14:24 ` [PATCH v2 2/2] exfat currently unconditionally strips trailing periods '.' when performing path lookup, but allows them in the filenames during file creation. This is done intentionally, loosely following Windows behaviour and specifications which state: Vasant Karasulli
2022-03-10 20:06 ` David Disseldorp
2022-03-11 9:03 ` Namjae Jeon
2022-03-11 9:22 ` Vasant Karasulli
2022-03-14 3:52 ` [PATCH v2 2/2] exfat currently unconditionally strips trailing periods '.' when performing path lookup, but allows them in the filenames during file creation. This is done intentionally, loosely following Windows behaviour and specifications which Kohada.Tetsuhiro
2022-03-16 13:45 ` David Disseldorp [this message]
2022-03-17 9:15 ` Kohada.Tetsuhiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220316144546.2da266c3@suse.de \
--to=ddiss@suse.de \
--cc="Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp\" <Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp>"@imap2.suse-dmz.suse.de \
--cc=linkinjeon@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sj1557.seo@samsung.com \
--cc=tiwai@suse.de \
--cc=vkarasulli@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).