Przeglądaj źródła

UI: Change remux file paths to OS style separators

Fixes #2272
Scratch 5 lat temu
rodzic
commit
c71b9df594
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      UI/window-remux.cpp

+ 4 - 2
UI/window-remux.cpp

@@ -461,6 +461,7 @@ void RemuxQueueModel::checkInputPath(int row)
 	if (entry.sourcePath.isEmpty()) {
 		entry.state = RemuxEntryState::Empty;
 	} else {
+		entry.sourcePath = QDir::toNativeSeparators(entry.sourcePath);
 		QFileInfo fileInfo(entry.sourcePath);
 		if (fileInfo.exists())
 			entry.state = RemuxEntryState::Ready;
@@ -468,8 +469,9 @@ void RemuxQueueModel::checkInputPath(int row)
 			entry.state = RemuxEntryState::InvalidPath;
 
 		if (entry.state == RemuxEntryState::Ready)
-			entry.targetPath = fileInfo.path() + QDir::separator() +
-					   fileInfo.completeBaseName() + ".mp4";
+			entry.targetPath = QDir::toNativeSeparators(
+				fileInfo.path() + QDir::separator() +
+				fileInfo.completeBaseName() + ".mp4");
 	}
 
 	if (entry.state == RemuxEntryState::Ready && isProcessing)