}\r
\r
autoNamePath = CheckAndHandleFilenameCollisions(autoNamePath, destinationFilename, task, userSettingService);\r
-\r
-\r
}\r
\r
return autoNamePath;\r
{\r
if (autoNamePath?.ToLower() == task.Source?.ToLower())\r
{\r
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), prefix + filenameWithoutExt + postfix + extension);\r
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), prefix + filenameWithoutExt + postfix + extension);\r
\r
int counter = 0;\r
while (File.Exists(autoNamePath))\r
{\r
counter = counter + 1;\r
string appendedNumber = string.Format("({0})", counter);\r
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), prefix + filenameWithoutExt + postfix + appendedNumber + extension);\r
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), prefix + filenameWithoutExt + postfix + appendedNumber + extension);\r
}\r
}\r
}\r
{\r
counter = counter + 1;\r
string appendedNumber = string.Format("({0})", counter);\r
- autoNamePath = Path.Combine(Path.GetDirectoryName(task.Source), filenameWithoutExt + appendedNumber + extension);\r
+ autoNamePath = Path.Combine(Path.GetDirectoryName(autoNamePath), filenameWithoutExt + appendedNumber + extension);\r
}\r
}\r
\r