Project

General

Profile

Actions

Feature #760

open

Option to convert filenames so that illegal Windows characters are omitted or replaced

Added by phelin over 12 years ago. Updated over 12 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
10/23/2011
Due date:
% Done:

0%

Estimated time:

Description

I could imagine this filesystem being used much with Windows clients through Samba sharing. In order to make that wholly supported the special characters that Windows doesn't approve with should be dealt with. For example the ':' is quite common within VDR recordings and causes the filenames to mangle in Windows. I assume this conversion would be easy to implement in your filesystem.

Actions #1

Updated by etobi over 12 years ago

This is already on the TODO list. The way vdrnfofs works right now is, that it assumes a 1:1 mapping between the "virtual" path/file to the real VDR path/recording dir. So the only way to do this is probably to e.g. map the colon to #3A. This results in ugly filenames, but it would be pretty straight forward.

If you have a better suggestion, it would be very much welcome! Otherwise I would go ahead and implement this (as an optional feature via a CLI argument)

Actions #2

Updated by phelin over 12 years ago

Well, having a few strange characters sets in the filename is a much lesser evil than the completely mangled filenames. With 1:1 mapping I do not really see any alternative, so it seems like a good way to go. I thought earlier that the vdrnfofs filename would be actually independent of the original filename, but that doesn't seem to be the case.

Actions #3

Updated by etobi over 12 years ago

The virtual and real filenames are always related. Think of this sceanrio: You have just mounted vdrnfofs and then directly open a file from the Fuse file system. Fuse only has the virtual path and must now somehow "calculate" the VDR recording dir for this. There are ways to do this without a direct mapping of the paths, but this would result in extra directory operations on the real file system to find a matching path.This would make things slower and we might have to throw more caching at this problem making things even more complex.

Using '#' as the escape char might not be ideal, 'cause VDR already uses this, so I think "$" might be better:

For directories:

00-1F, 22 ("), 3C (<), 3E (>), 7C (|)  => $XX

For Files:

2A (*), 3A (:), 3F (?), 5C (\) => $XX

Escaping the escape character:

$ => $24
Actions #4

Updated by etobi over 12 years ago

  • Assignee set to etobi
  • Target version set to Version 0.9
Actions

Also available in: Atom PDF