~bitfehler/m2dir

5 2

Colon in filename will have problems on NTFS

Details
Message ID
<D0M8OYEG3GIW.15LCF7OUNR5VA@hauleth.dev>
DKIM signature
pass
Download raw message
I have checked specs of the project and it seems like really nice project.
However I have also noticed that `:` (colon) is used for separating user defined
name from the tag. That can be problematic as on NTFS drives support Alternate
Data Streams (ADS) [1] and uses colon to access them. This mean that this spec
is currently almost exclusively UNIX-only. I do not know if you care about
Windows users, but it is something worth noting.

[1]: https://en.wikipedia.org/wiki/NTFS#Alternate_data_stream_(ADS)

--
Hauleth
~@hauleth.dev
Details
Message ID
<17c705d1071a782b.f9706245cd3a3f97.3b41d60ef9e2fbfb@soywod>
In-Reply-To
<D0M8OYEG3GIW.15LCF7OUNR5VA@hauleth.dev> (view parent)
DKIM signature
pass
Download raw message
> However I have also noticed that `:` (colon) is used for separating
> user defined name from the tag. That can be problematic on NTFS drives

Indeed, Maildir suffers from the same issue, it could be nice to take
another character that would work everywhere.
Details
Message ID
<532c889c-f210-474c-89e7-b0fb3dceb222@bitfehler.net>
In-Reply-To
<17c705d1071a782b.f9706245cd3a3f97.3b41d60ef9e2fbfb@soywod> (view parent)
DKIM signature
pass
Download raw message
Hey,

On 4/17/24 11:02 AM, Clément DOUIN wrote:
>> However I have also noticed that `:` (colon) is used for separating
>> user defined name from the tag. That can be problematic on NTFS drives
> 
> Indeed, Maildir suffers from the same issue, it could be nice to take
> another character that would work everywhere.

Thanks for bringing this up. The colon is in fact at this point not as 
important as it was in some of the previous iterations. So while I 
wouldn't go too far out of my way for it, I think making this work on 
NTFS is an option. Let me study the available characters and think about 
it for a bit.

Cheers,
Conrad
Details
Message ID
<17c70a2394fc691f.f9706245cd3a3f97.3b41d60ef9e2fbfb@soywod>
In-Reply-To
<532c889c-f210-474c-89e7-b0fb3dceb222@bitfehler.net> (view parent)
DKIM signature
pass
Download raw message
> Let me study the available characters and think about it for a bit.

If I remember well, the `maildir` crate is using the semi-colon `;` on
Windows:

<https://github.com/staktrace/maildir/pull/29>

<https://github.com/staktrace/maildir/blob/354647291c4b12d7d1294bd8a81460a3eebfd701/src/lib.rs#L25>

-- 
Regards
Clément DOUIN
https://soywod.me
Details
Message ID
<8f8416aa-639f-4feb-bd05-84bd135816b0@bitfehler.net>
In-Reply-To
<17c70a2394fc691f.f9706245cd3a3f97.3b41d60ef9e2fbfb@soywod> (view parent)
DKIM signature
pass
Download raw message
On 4/17/24 12:22 PM, Clément DOUIN wrote:
>> Let me study the available characters and think about it for a bit.
> 
> If I remember well, the `maildir` crate is using the semi-colon `;` on
> Windows:

Not a fan of the semicolon b/c of its meaning for the shell. But after 
some testing, I think the comma (,) may be an even better choice than 
the colon. Bash command completion requires escaping of colons in 
filenames (not sure why, zsh and ash don't), making their handling 
slightly awkward. The comma does not have this issue. And given that it 
is apperently also used by Maildir on Windows (judging from the linked 
PR), that seems like the best choice to me.

I will incorporate that into the spec, unless there are any compelling 
reasons against the comma?

Cheers,
Conrad
Details
Message ID
<17c7138e47641060.f9706245cd3a3f97.3b41d60ef9e2fbfb@soywod>
In-Reply-To
<8f8416aa-639f-4feb-bd05-84bd135816b0@bitfehler.net> (view parent)
DKIM signature
pass
Download raw message
> I think the comma (,) may be an even better choice than the colon.
>
> I will incorporate that into the spec, unless there are any compelling
> reasons against the comma?

Sounds great!

-- 
Regards
Clément DOUIN
https://soywod.me
Reply to thread Export thread (mbox)