From 4fed0cd54290a30e2306620b313a36358d765531 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 17 Nov 2008 18:31:42 +0000 Subject: [PATCH] comment about file name truncation --- src/torrent_info.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 3912fd803..8bba9241e 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -158,6 +158,9 @@ namespace void trim_path_element(std::string& path_element) { + // on windows, NAME_MAX refers to Unicode characters + // on linux it refers to bytes (utf-8 encoded) + // TODO: Make this count Unicode characters instead of bytes on windows if (path_element.size() > NAME_MAX) { // truncate filenames that are too long. But keep extensions!