Topic: Can't rename with a dot in the path

Hi,

It seems there is a bug in svmanager, when changing a gallery dir, if there is a dot in the path name. Here is what I get:

Warning: rename(g1,../../tototiti/new_name) [function.rename]: No such file or directory (galleryset.php, line 343)
Notice: unable to rename g1

The complete path is : localhost/~fma/toto.titi/new_name

Note that g1 was correctly created; it seems to be a problem with the rename function (note that it removed the dot).

Re: Can't rename with a dot in the path

SvManager removes special characters from the names of new directories it creates – including dots (bit vicious I know). What seems to be happening here is that it's removing dots from existing directory paths as well and then of course it can't find them.

I'll look into it and get back to you.

jack

Jack Hardie
SimpleViewer Support Team.

Re: Can't rename with a dot in the path

Thanks!

Re: Can't rename with a dot in the path

The basic issue here is that any file paths that you use in svManager will turn into URLs for the galleries. Many servers will accept characters (such as question mark) in file and directory names, that cause trouble in URLs. There is a large grey area of characters (e.g. space character) that are not recommended for URLs but usually work in practice.

The next release of svManager will take a different approach to this issue. The following characters will be fully acceptable in svManager file paths and URLs:

ALPHA / DIGIT / "-" / "." / "_" / "~"

This will bring svManager into line with the list of 'unreserved' characters in RFC3986. Note that this list includes the dot character. ALPHA will usually include accented characters, umlauts etc but that depends how your server is set up.

If you use a character that is rejected by your server as not acceptable in a file path then you will get an error – no change, that's what happens now.

If you use a character that is ok in a file path but not in the acceptable list for URLs then you will see a notice on the customize screen but you will be able to carry on using it. The notice will remain until you remove the character. Note that we are talking about the file path from the web root, i.e. including the path from the web root to the svManager directory itself,  since that is what is going to appear in the URLs.

The whole idea is to give you more flexibility while letting you know when you might be introducing problems for some gallery visitors on some browsers or possible problems with future browsers releases.

Comments welcome.

jack

Jack Hardie
SimpleViewer Support Team.