File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -226,11 +226,11 @@ void MainWidget::checkMilestone()
226226 if (m_destinationPath.isEmpty ()) {
227227
228228 if (m_drives.length () > 1 && availableDiskSpace (QString (m_drives.at (0 )) + " :/" ) < availableDiskSpace (QString (m_drives.at (1 )) + " :/" )) {
229- m_destinationPath =QString ( m_drives.at (1 )) + " :/" + PATH;
229+ m_destinationPath = QString ( m_drives.at (1 )) + " :/" + PATH;
230230 } else if (!m_drives.isEmpty ()) {
231231 m_destinationPath = QString (m_drives.at (0 )) + " :/" + PATH;
232232 } else {
233- m_destinationPath = QStandardPaths::writableLocation (QStandardPaths::DocumentsLocation);
233+ m_destinationPath = QStandardPaths::writableLocation (QStandardPaths::DocumentsLocation) + PATH ;
234234 }
235235
236236 QMessageBox::StandardButton button;
@@ -253,6 +253,15 @@ void MainWidget::checkMilestone()
253253 }
254254 }
255255
256+ if (m_destinationPath.endsWith (" /" )) {
257+ m_destinationPath.remove (m_destinationPath.length ()-1 ,1 );
258+ }
259+
260+ if (!m_destinationPath.endsWith (PATH,Qt::CaseInsensitive)) {
261+ m_destinationPath += " /" ;
262+ m_destinationPath += PATH;
263+ }
264+
256265 QDir dir (m_destinationPath);
257266 if (!dir.exists ()) {
258267 if (!dir.mkpath (m_destinationPath)) {
You can’t perform that action at this time.
0 commit comments