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

illegal characters in path

6 Answers 184 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Fit2Page asked on 03 Dec 2015, 07:42 AM

Hi,

 

Since the latest update I get error message [illegal characters in path] where I try to rename a file to a name which contains a space.

I am sure this was always allowed till now. Of course our CMS customers have thousands of assets containing spaces which cannot be renamed right now, so this is a very serious issue. Please see attached screenshots.

Marc

6 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 04 Dec 2015, 03:03 PM
Hi Marc,

Thank you for bringing this issue to us. I have logged it with highest priority and we will fix it as soon as possible. For the time being you can fix this behavior by adding the following workaround to he page containing FileExplorer:
<script>
    var $ = $telerik.$;
 
    Telerik.Web.UI.RadFileExplorer.prototype._shouldPreventRename = function (newName) {
        var invalidChars = this._getInvalidCharsToString().replace(/ /g, '');
 
        for (var i = 0; i < invalidChars.length; i++) {
            if ($telerik.$.inArray(invalidChars[i], newName) > -1) {
                return true;
            }
        }
 
        return false;
    }
</script>

I have also upgraded your Telerik point as a small token of gratitude for the reported issue.

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Charles
Top achievements
Rank 1
answered on 06 Jan 2016, 03:02 AM
+1  Same issue here
0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 25 Jan 2016, 02:18 PM

Hi,

 

With the latest update I get a new error here, see attached.

As this is in our CMS can you give this prio? I must say I find it very unusual from Telerik to get error on error in new releases...

Marc

0
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
answered on 26 Jan 2016, 07:37 AM

Hi,

I discovered that this is an issue with writing to a folder in a virtual directory. There were not the proper right set. So I think I owe you an apology for my reaction. Maybe the error message that occured could be some more explainable.

Marc

0
Vessy
Telerik team
answered on 26 Jan 2016, 02:52 PM
Hi Marc,

Thank you for the update - I am glad you managed to find the solution of the problem. I will pass your suggestion for making the thrown error message more descriptive for a further consideration.

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
TestTeam
Top achievements
Rank 2
Iron
answered on 31 Jul 2022, 09:58 AM | edited on 01 Aug 2022, 09:19 AM

Good morning,

I continue to have problems renaming new directory or renaming files because File Explorer allow the users to rename with a final SPACE.

These directory or files with name containing a final space generate errors and prevent you from browsing the contents of the directory.

Thanks

 

 
Rumen
Telerik team
commented on 01 Aug 2022, 02:50 PM

Good morning!

I tried to reproduce the reported folder renaming problem with the latest version in the live demos but without success.

I renamed a folder name by placing a space at the end but the renaming did not happen. There is now a check in the source code that trims the space:

 

	_shouldPreventRename: function (newName) { 
		var invalidChars = this._getInvalidCharsToString().trim();

		for (var i = 0; i < invalidChars.length; i++) {
			if ($.inArray(invalidChars[i], newName) > -1) {
				return true;
			}
		}

		return false;
	}

 

For your convenience, I recorded and attached my test. Can you please see it and let me know what I am missing to repro the problem? Please provide step-by-step instructions with screenshots or a video so that I can replicate the renaming issue. Thank you!

Tags
Editor
Asked by
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Vessy
Telerik team
Charles
Top achievements
Rank 1
Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
TestTeam
Top achievements
Rank 2
Iron
Share this question
or