Hi,
I'm using RadFileExplorer in a project that includes file version control. Occasionally, when attempting to save a new version of a file, I receive the alert:
"A file with a name same as the target already exists!"
This issue seems inconsistent — it doesn't appear limited to a specific file type, but I've noticed it more frequently with image files or files that have numbers in their names.
I came across a possible solution in this File Explorer as a Version Control issues. in UI for ASP.NET AJAX | Telerik Forums, where it was suggested to modify the GetFIle method to always return null. Here's the method :
{
string virtualPath = RemoveProtocolNameAndServerName(url);
string physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
if (physicalPath == null)
return null;
if (!File.Exists(physicalPath))
{
return null;
}
return File.OpenRead(physicalPath);
}
if it is okay to overriding this method to always return null? Is it a safe and recommended approach to prevent the "file already exists" error in version control scenarios?