enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
202 stars 34 forks source link

export fails with filename too long #6638

Open ComLock opened 6 years ago

ComLock commented 6 years ago

We need to have an export format that works on most filesystems.

GlennRicaud commented 6 years ago

There has been an export with a content having a name so long that it caused a "File name too long" on Windows when exporting. The workaround for now is to rename the content or to use the dump.

But so, we could have the export flattened and by node ID.

To be discussed

ComLock commented 6 years ago

Im not to certain about flattened either, filesystems have a limit to the number of files in a folder.

With a single large binary file the "only" limitation would be file size?

Perhaps some fast compression could be used to?

I know I have mentioned rsync in the past which would make getting updates from nightly export very quick, but I don't know of anyone actually setting it up.

Perhaps deltas would be even better. Like git...

sigdestad commented 5 years ago

We should set a max limit for node names. I.e. 128chars (utf8). Let's check out what is used by various file systems, and support the smallest size (so export will still work).

rymsha commented 4 years ago

128 utf-8 chars is 512 bytes max (assuming full utf-8 support). Way too much for filesystems like ext4 exFat etc. Most common limitation is 255 bytes.

https://en.m.wikipedia.org/wiki/Comparison_of_file_systems

sigdestad commented 4 years ago

Hmmm. We do require use of utf-8 filsystem for servers. I thought most modern OS' would support this by now?

rymsha commented 4 years ago

They do, this is not a question here.

So most interesting limitations for modern systems are:

rymsha commented 4 years ago

Sooo... In path we can only support character set representable by ucs-2 with max 255 bytes per segment (when utf-8 encoded), maximum 32000 characters for full path.

rymsha commented 4 years ago

Most likely people hit 260 characters per filepath on Windows 10. But there is a workaround via GPO Enable Win32 long paths

rymsha commented 4 years ago

And worth to mention on Windows some filenames (COM1, LPT, etc...) are illegal

GlennRicaud commented 4 years ago

Decide in PAB if we want to have a flatten structure