From b0a492b605d73d192946217f28260ee9cbb8c6a3 Mon Sep 17 00:00:00 2001 From: Robert Krajewski Date: Sat, 27 Apr 2019 22:20:34 +0200 Subject: [PATCH] Limit length of every dir/file created to 75 characters --- src/utils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.cpp b/src/utils.cpp index 379d7f8..1258af4 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -41,7 +41,10 @@ QString Utils::getElementLocalPath(Structureelement *item, QString downloadDirec Structureelement* parent = item; while ((parent = (Structureelement*) parent->parent()) != 0) { - path.push_front(parent->text() % "/"); + auto element_text = parent->text(); + if(element_text.length() > 75) + element_text = element_text.left(75); + path.push_front(element_text % "/"); } // Downloadverzeichnis