TeamMsgExtractor / msg-extractor

Extracts emails and attachments saved in Microsoft Outlook's .msg files
GNU General Public License v3.0
742 stars 172 forks source link

Handle long file paths, expecially for deeply embeded MSG files. #202

Open TheElementalOfDestruction opened 3 years ago

TheElementalOfDestruction commented 3 years ago

Problem:

Currently the save function has no detection, whatsoever, for long file paths. It is currently possible for a file to end up with a name that is longer than the max path length on Windows (unsure if Unix based systems have a path length maximum, will look into). If is also possible for embedded MSG files, especially ones that are embedded multiple times over, to end up with path lengths that are too long.

Solution:

One solution (which has already been implemented into the next version) is to use a zip file to save the data. It at the very least much less limited in terms of path length than the Windows filesystem. However, the most optimal solution would likely be code that will handle the lengths to ensure that no problems occur. If it is not possible, it should throw an exception. I believe that the save function should also have an argument for manually setting the maximum size, as this will allow people to manually override the length.

TheElementalOfDestruction commented 2 years ago

Partial progress was made to this in version 0.29.0. We want to revisit this again and make it better.