Skip to content

Commit

Permalink
Fix: Use system directory separators (#187)
Browse files Browse the repository at this point in the history
...instead of hardcoded slashes

Co-authored-by: a-sum-duma <a-sum-duma@users.noreply.github.com>
  • Loading branch information
a-sum-duma and a-sum-duma authored Jul 25, 2022
1 parent 2c95060 commit d4e0378
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gui/src/forms/frmconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <QDesktopServices>
#include <QDesktopWidget>
#include <QDir>
#include <QFileDialog>
#include <QFileInfo>
#include <QMessageBox>
Expand Down Expand Up @@ -150,7 +151,7 @@ void frmConvert::checkFPSNeeded() {
QFileInfo srcSubFI(ui.leSrcSubFile->text());

QString movieFilePathBase =
srcSubFI.absolutePath() + "/" + srcSubFI.completeBaseName();
srcSubFI.absoluteDir().filePath(srcSubFI.completeBaseName());

foreach (QString movieExt, staticConfig->movieExtensions()) {
QString movieFilePath = movieFilePathBase + "." + movieExt;
Expand Down Expand Up @@ -216,8 +217,8 @@ void frmConvert::generateTargetFileName() {
extension = ui.cbTargetExtension->currentText();
}

QString defaultTargetPath = srcSubFI.absolutePath() + "/" +
srcSubFI.completeBaseName() + "." + extension;
QString defaultTargetPath = srcSubFI.absoluteDir()
.filePath(srcSubFI.completeBaseName() + "." + extension);
ui.leTargetFileName->setText(defaultTargetPath);
}
}
Expand Down

0 comments on commit d4e0378

Please sign in to comment.