1
1
mirror of https://github.com/mgree/ffs.git synced 2024-08-16 23:00:48 +03:00
Commit Graph

2 Commits

Author SHA1 Message Date
Michael Greenberg
85b1ac6da9
Better, configurable name munging (#41)
A new flag `--munge [rename|filter]` controls how a name munging will work.

Name munging only applies to fields named '.', '..', containing a NUL byte, or containing a forward slash '/'.

The `rename` option (the default) will change '.' to '_.' and '..' to '_..'; each NUL byte turns into '_NUL_' and each slash turns into '_SLASH_'.

This greatly simplified policy means that spaces and other special characters should work just fine in field names now.
2021-07-08 08:55:44 -07:00
Michael Greenberg
726a175163
More careful name munging (#34)
Save original names that don't work as filenames (e.g., `.` and `..`).

We restore these names as appropriate---if a file is `rename`d with the _same_ name, we leave it alone. But renames to fresh names destroy original names.

Resolves #29.

There is no way to create a file with such a name: the metadata is purely copied. There's a TODO note in the code to allow users to inspect and edit this metadata, but it's not worth exposing until somebody asks for it. (I mean, really, please don't use `.` or `:/` as a property name.)
2021-07-02 08:01:07 -07:00