if (UserSettingService.GetUserSetting<string>(UserSettingConstants.AutoNamePath).Trim().StartsWith("{source_path}") && !string.IsNullOrEmpty(mainWindow.sourcePath))\r
{\r
string savedPath = UserSettingService.GetUserSetting<string>(UserSettingConstants.AutoNamePath).Trim().Replace("{source_path}\\", string.Empty).Replace("{source_path}", string.Empty);\r
- string requestedPath = Path.Combine(Path.GetDirectoryName(mainWindow.sourcePath), savedPath);\r
+\r
+ string directory = Directory.Exists(mainWindow.sourcePath)\r
+ ? mainWindow.sourcePath\r
+ : Path.GetDirectoryName(mainWindow.sourcePath);\r
+ string requestedPath = Path.Combine(directory, savedPath);\r
\r
autoNamePath = Path.Combine(requestedPath, destinationFilename);\r
if (autoNamePath == mainWindow.sourcePath)\r