Skip to content

Commit

Permalink
Removed check for long download paths over 260 characters on windows,…
Browse files Browse the repository at this point in the history
… since Qt uses the long path api options in windows and thus handles them fine.
  • Loading branch information
Tastaturtaste committed Sep 10, 2021
1 parent 211c563 commit 84e3ad5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/browser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ void Browser::on_syncPushButton_clicked()

QItemSelection newSelection;
ui->dataTreeView->collapseAll();
bool hasShownLongPathError = false;

foreach(Structureelement *currentElement, elementList)
{
Expand All @@ -178,17 +177,6 @@ void Browser::on_syncPushButton_clicked()
QString directoryPath = Utils::getElementLocalPath(currentElement, downloadPath, false, false);
QDir directory(directoryPath);

// prevent creation of paths with a length of more than 260 characters
if((directoryPath.length() + currentElement->text().length()) > 260 && QSysInfo::productType() == "windows")
{
if(!hasShownLongPathError)
{
Utils::errorMessageBox(tr("Pfad zu lang!"), tr("Pfad zur Datei enthält mehr als 260 Zeichen und kann daher nicht erstellt werden. "
"Bitte ändere den Downloadverzeichnis auf einen Pfad mit weniger Zeichen! Datei wird übersprungen."));
hasShownLongPathError = true;
}
continue;
}

// Ordner ggf. erstellen
if(!directory.mkpath(directoryPath))
Expand Down

0 comments on commit 84e3ad5

Please sign in to comment.