}\r
}\r
\r
+ /// <summary>\r
+ /// Looks up a localized string similar to You cannot overwrite the source file you want to convert.\r
+ ///Please choose a different filename..\r
+ /// </summary>\r
+ public static string Main_SourceDestinationMatchError {\r
+ get {\r
+ return ResourceManager.GetString("Main_SourceDestinationMatchError", resourceCulture);\r
+ }\r
+ }\r
+ \r
/// <summary>\r
/// Looks up a localized string similar to You must turn on automatic file naming AND set a default path in preferences before you can add to the queue..\r
/// </summary>\r
<value>The preset may be corrupted or from an older version of HandBrake which is not supported. \r
Presets from older versions must be re-created in the current version.</value>\r
</data>\r
+ <data name="Main_SourceDestinationMatchError" xml:space="preserve">\r
+ <value>You cannot overwrite the source file you want to convert.\r
+Please choose a different filename.</value>\r
+ </data>\r
</root>
\ No newline at end of file
return false;\r
}\r
\r
+ if (this.Destination == this.ScannedSource.ScanPath)\r
+ {\r
+ this.errorService.ShowMessageBox(Resources.Main_SourceDestinationMatchError, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+ this.Destination = null;\r
+ return false;\r
+ }\r
+\r
if (this.scannedSource != null && !string.IsNullOrEmpty(this.scannedSource.ScanPath) && this.Destination.ToLower() == this.scannedSource.ScanPath.ToLower())\r
{\r
this.errorService.ShowMessageBox(Resources.Main_MatchingFileOverwriteWarning, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
bool? result = saveFileDialog.ShowDialog();\r
if (result.HasValue && result.Value)\r
{\r
+ if (saveFileDialog.FileName == this.ScannedSource.ScanPath)\r
+ {\r
+ this.errorService.ShowMessageBox(Resources.Main_SourceDestinationMatchError, Resources.Error, MessageBoxButton.OK, MessageBoxImage.Error);\r
+ this.Destination = null;\r
+ return;\r
+ }\r
+\r
this.Destination = saveFileDialog.FileName;\r
\r
// Set the Extension Dropdown. This will also set Mp4/m4v correctly.\r