This is a migrated thread and some comments may be shown as answers.

FileExplorer stops working after 2012 Q1 update

5 Answers 108 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 17 Feb 2012, 05:55 PM
For some reason, a lot of things appear to be broken using the custom file provider option after upgrading to Q1. I'm using the Custom File Provider that was created by Telerik as an example of how to reference network shares. I'm not sure if it changed with the most recent update, but I know it doesn't work anymore with Q1.

When I attempt to copy a file, I get a permissions error. When I attempt to rename a file, I get a permissions error. I looked at the code a bit and noticed some odd changes. In the GetPath function, it used to pass in the virtual path, but with the update, it's been passing in an empty string. This appears to be the cause of the permissions errors since the path isn't valid.

Is something broken, or was a breaking change released that I'm going to have work around. I didn't see anything in the release notes.

Thanks,
Adam

5 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Feb 2012, 11:28 AM
Hi Adam,

We are aware of an bug introduced in the latest version of RadFileExplorer that is related to the custom content providers compatibility. We are working on its fix and will try to do our best to have it handled until the service pack.

To workaround this issue, you need to provide the path to the file (including the filename) to the Location property of the FileItem in the GetFiles() method of the content provider, e.g.:
private FileItem[] GetFiles(string virtualPath)
{
    List<FileItem> filesItems = new List<FileItem>();
    string physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
    if (physicalPath == null)
        return null;
    List<string> files = new List<string>();// The files in this folder : 'physicalPath' ;
 
    try
    {
        foreach (string patern in this.SearchPatterns)
        {// Applied flters in the 'SearchPatterns' property;
            foreach (string filePath in Directory.GetFiles(physicalPath, patern))
            {
                if (!files.Contains(filePath))
                    files.Add(filePath);
            }
        }
 
        foreach (string filePath in files)
        {
            FileInfo fileInfo = new FileInfo(filePath);
            string url = ItemHandlerPath + "?path=" + virtualPath + fileInfo.Name;
            FileItem fileItem = new FileItem(fileInfo.Name,
                                                fileInfo.Extension,
                                                fileInfo.Length,
                                                virtualPath + fileInfo.Name,
                                                url,
                                                null,
                                                GetPermissions(filePath)
                                            );
            filesItems.Add(fileItem);
        }
    }
    catch (IOException)
    {// The parent directory is moved or deleted
 
    }
 
    return filesItems.ToArray();
}


Kind regards,
Dobromir
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
CCG
Top achievements
Rank 2
answered on 29 Feb 2012, 03:28 PM
In addition to the problem above (for which the work-around seems to work perfectly fine), we also have the problem that our files are now recognized and rendered as folders. Is this also a known issue?
0
Dobromir
Telerik team
answered on 29 Feb 2012, 04:31 PM
Hi Jérémy,

We are not aware of such issue of RadFileExplorer, however, the side effects of the bug may differ according to the content provider. Could you please provide the content provider that you are using so we can examine and investigate the issue further?

Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
David
Top achievements
Rank 2
answered on 05 Mar 2012, 07:39 PM
We too are having the same trouble with this release + our customer provier. All of our clientside handlers are failing due to the fact the contextual menu cannot access or return the proper current selected item.

The work around was to create a global js var, but thtere are still far too many issues to make it workable. The DELETE button tries to delete the ROOT -- but can't. again, it can;t find the current selected item.

We are also seeing permissions errors if we try to rename or delete any type of item.
0
David
Top achievements
Rank 2
answered on 05 Mar 2012, 07:44 PM
Hi Dobromir,
I can send our custom file provider, but I am not in a position to share it publicly. I will create a new support ticket with it attached.
Tags
FileExplorer
Asked by
Adam
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
CCG
Top achievements
Rank 2
David
Top achievements
Rank 2
Share this question
or