mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-23 00:09:14 +01:00
Transcodedialog: moving things into more specific scope
This commit is contained in:
parent
6b6547095a
commit
dd1393ea3a
@ -212,13 +212,14 @@ void TranscodeDialog::JobComplete(const QUrl& input, const QString& output,
|
||||
UpdateProgress();
|
||||
|
||||
bool overwrite_existing = ui_->remove_original->isChecked();
|
||||
|
||||
if (success && overwrite_existing) {
|
||||
QFileInfo input_fileinfo(input);
|
||||
QFileInfo output_fileinfo(output);
|
||||
bool same_extension = input_fileinfo.suffix() == output_fileinfo.suffix();
|
||||
bool same_path =
|
||||
input_fileinfo.absolutePath() == output_fileinfo.absolutePath();
|
||||
|
||||
if (success && overwrite_existing) {
|
||||
QFile(input).remove();
|
||||
if (same_path && same_extension) {
|
||||
QFile(output).rename(input);
|
||||
|
Loading…
Reference in New Issue
Block a user