mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Showing in folder instead of launching media files with bad extensions.
Thanks for the report to: Sadegh Ahmadzadegan - Omid Ghaffarinia.
This commit is contained in:
@@ -1541,7 +1541,11 @@ void MainWidget::audioPlayProgress(const AudioMsgId &audioId) {
|
||||
DocumentData *audio = audioId.audio;
|
||||
QString filepath = audio->filepath(DocumentData::FilePathResolveSaveFromData);
|
||||
if (!filepath.isEmpty()) {
|
||||
psOpenFile(filepath);
|
||||
if (documentIsValidMediaFile(filepath)) {
|
||||
psOpenFile(filepath);
|
||||
} else {
|
||||
psShowInFolder(filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1568,7 +1572,11 @@ void MainWidget::documentPlayProgress(const SongMsgId &songId) {
|
||||
DocumentData *document = songId.song;
|
||||
QString filepath = document->filepath(DocumentData::FilePathResolveSaveFromData);
|
||||
if (!filepath.isEmpty()) {
|
||||
psOpenFile(filepath);
|
||||
if (documentIsValidMediaFile(filepath)) {
|
||||
psOpenFile(filepath);
|
||||
} else {
|
||||
psShowInFolder(filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user