Import does not accept "+" in the pathname

dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-03-20 01:01

"Import from" directory does not accept "+" in the path. This is a perfectly good pathname character, and indeed, G2 accepts it in the path to the albums. Workaround was trivial.

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-03-20 05:05
dkgibson wrote:
"Import from" directory does not accept "+" in the path. This is a perfectly good pathname character, and indeed, G2 accepts it in the path to the albums. Workaround was trivial.

Update: G2 also does not accept a "+" in the path when attempting to add pix from a local directory:

Quote:
Error (ERROR_BAD_PATH) : / /tmp/_DSC0399_2005-03-10_16:44:54.jpg
in modules/core/classes/GalleryPhotoItem.class at line 121 (gallerystatus::error)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 207 (galleryphotoitem::create)
in modules/core/classes/GalleryCoreApi.class at line 1382 (galleryitemhelper_medium::additemtoalbum)
in modules/core/ItemAddFromServer.inc at line 146 (gallerycoreapi::additemtoalbum)
in modules/core/ItemAddFromServer.inc at line 73 (itemaddfromserver::additem)
in modules/core/ItemAdd.inc at line 72 (itemaddfromserver::handlerequest)
in main.php at line 166 (itemaddcontroller::handlerequest)
in main.php at line 46
in main.php at line 39

The actual path specified was: /+/tmp/_DSC ...

The code in modules/core/ItemAddFromServer.inc (additem) is doing a urldecode() on a local filename. That's probably not a good idea, unless you've already done a urlencode on it.

This problem probably occurs in several places. For example, I was able to ADD "/+/tmp" to the list of local directories that I can import from, but I'm unable to DELETE it from the list.

----

Gallery URL (optional): http://amateur.mailpen.net/gallery/
Gallery version:2 - beta 1
Webserver (with version): Apache 2.0.47
Datatabase (with version): PostgreSQL 7.4.5
PHP version (eg 4.2.1): 4.3.10
phpinfo URL (optional): ???
Graphics Toolkit(s): NetPBM
Operating system: Fedora Core 1
Web browser/version: IE 6.0
G1 version (for migration bugs): 1.5RC2

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-20 06:36

please file a bug on sourceforge if you haven't already, thanks!

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-03-20 09:25
mindless wrote:
please file a bug on sourceforge if you haven't already, thanks!

Oh, I thought we were supposed to file them here. I've opened a sourceforge account and reported the above.

Note that since my primary Linux root file system is mounted read-only, I've mounted an additional read/write partition as "/+", and /home, /var, and /tmp link to /+/home, /+/var, and /+/tmp, respectively. As a result, ALL writeable directories have a "+" in the pathname. Due to the above bug, this makes it difficult (but not impossible) to add additional images, so this bug is a show-stopper for me. As a result, while I will continue to occasionally play with G2 (which I like very much), I have to go back to 1.5RC2 for my users.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Sun, 2005-03-20 09:35

Generally you should mention a problem here before filing it as a bug on sourceforge.

I can see how this would be a showstopper, but your partition scheme is weird. More power to ya. ;)

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-05-08 20:25

Still broken in beta 2.

 
gallerynator

Joined: 2005-05-04
Posts: 59
Posted: Sun, 2005-05-08 20:55
dkgibson wrote:
"Import from" directory does not accept "+" in the path. This is a perfectly good pathname character, and indeed, G2 accepts it in the path to the albums. Workaround was trivial.

forget it.
You will always get any problems, because your way is not conform with the standard-RFC.

ftp://ftp.ripe.net/rfc/

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-05-08 20:58

And which RFC would that be? Your opinion seems to be at variance with:

1. Unix, Linux, and even Windows filesystems can deal seamlessly with "+" in a pathname, and have for over 25 years.

2. The Gallery2 developers, who above asked me to enter it as a bug in SourceForge, and who have posted there an attempted fix.

If you actually have a specific RFC to support your contention, try to contribute more to the discussion than a nebulous "your way is not conform with the standard-RFC".

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-05-08 22:19

dkgibson, your bug is filed on sourceforge and has not been worked on yet, as far as I know. Don't pay any attention to gallerynator.

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-05-08 22:24

Thanks! I've updated my bug report on SourceForge as a result of my retest w/ beta 2.

 
gallerynator

Joined: 2005-05-04
Posts: 59
Posted: Sun, 2005-05-08 22:58
mindless wrote:
dkgibson, your bug is filed on sourceforge and has not been worked on yet, as far as I know. Don't pay any attention to gallerynator.

The Requests for Comments (RFC) document series is a set of technical and organizational notes about the Internet (originally the ARPANET), beginning in 1969. Memos in the RFC series discuss many aspects of computer networking, including protocols, procedures, programs, and concepts, as well as meeting notes, opinions, and sometimes humor. For more information on the history of the RFC series, see "30 years of RFCs".

The official specification documents of the Internet Protocol suite that are defined by the Internet Engineering Task Force (IETF) and the Internet Engineering Steering Group (IESG ) are recorded and published as standards track RFCs. As a result, the RFC publication process plays an important role in the Internet standards process. RFCs must first be published as Internet Drafts.

The RFC-Editor

The RFC Editor is the publisher of the RFCs and is responsible for the final editorial review of the documents. The RFC Editor also maintains a master file of RFCs called the "RFC Index", which can be searched online. For nearly 30 years, The RFC Editor was Jon Postel; today the RFC Editor is a small group funded by the ISOC.

---------cut----

But is ok, mindless, do what _you_ think and report the human bug as a bug of the nice G2. Report everything as a bug of G2, if there are only blonde G2-users using wrong filename-definitions. I am sorry, that I disturb you.

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-05-08 23:10

I'm well familiar with the RFCs & their history and have read many of them, thank you. When I tell someone that something is in the RFCs, I have the common courtesy (not to mention common sense) to tell them WHICH RFC.

Telling someone that something is in the RFCs without being able to mention which RFC, just isn't very believable.

Either quote a specific RFC or go away.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Sun, 2005-05-08 23:18

dkgibson, I'm sorry that I haven't worked on this - I've been kind of busy with school and the two side-project gallery2 things that were each supposed to be quick changes but turned into long processes.

I'm tempted to work on it right now, just because gallerynator is being a jerk.

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Sun, 2005-05-08 23:24

Thanks, but don't rush to do it just for me. We're all busy (except for those that post 20 messages in four days -- grin), and I may not get a chance to check it out until next weekend at the earliest. Although I really like the look and architecture of 2.0b2, I'm reasonably happy with 1.5 for the time being.

 
gallerynator

Joined: 2005-05-04
Posts: 59
Posted: Mon, 2005-05-09 00:25
jmullan wrote:
dkgibsonI'm tempted to work on it right now, just because gallerynator is being a jerk.

You're right, I am a jerk. I did not introduce myself. Letz do it now. gallerynator is a computer scientist since 1981, this means for more than 20 years. I am now 40 years old and have 13 grey hairs.

gallerynator thinks, that you guys did a great job with your Gallery-Software and want to help a little bit, so we can come as soon as possible to the final-release of G2.

Especially since gallerynator had to see, that some guys of your are only here to make money with supporting other helpless users. I am here. I give support here for FREE, because the Gallery-Software is also for FREE. I assist this philosophy.

And now, if you are busy with your school, babe, then it is ok. Go to your school and let us work here to get the final-release of G2.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-05-09 09:41

gallerynator, your posts in this topic are all very descriptive (description of RFC rather than giving a link to the specific RFC), description of yours and how greedy some of us are, etc).

But how about continuing what you have begun? You said it wasn't conform to the RFCs. Which RFCs? How about a link or a number + section?

It's true that we don't allow all characters in the filenames, but it would make sense to accept all chars that are accepted filenames for URLs, unix and windows (in all three of them). And "+" should be one of those characters.

 
gallerynator

Joined: 2005-05-04
Posts: 59
Posted: Mon, 2005-05-09 18:11

vailiant, you are correct. Maybe I am too strong because of all the RFC-rules and all my experiences in programming softwares for over 20 years. I must say, it is too early to talk about the RFC-theme, because the first thing what is to do is to bring the final-release of G2. The G2 is still no the beta in the version 2.0 beta 2. RFC and such special themes like with the "+"-sign would be a theme for an update from the final-version 2.0 to 2.1.

So, for now, see it so: G2 is a real nice tool. Letz assist the final-version and bring it to 2.0. We talk later about the RFC. If you cannot await it, then the ftp://ftp.ripe.net/rfc/rfc-index.txt and http://www.rfc-editor.org/ is a good start.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-05-09 18:22

gallerynator, are you not able to refer to a specific RFC and a specific section?

We are always open to suggestions and possible improvements. But if you have no very specific and constructive descriptions / instructions, we can't fix it.

 
dkgibson
dkgibson's picture

Joined: 2005-03-16
Posts: 22
Posted: Mon, 2005-05-16 03:51

Perhaps gallerynator is confusing RFCs and POSIX??? There is a POSIX standard for "portable filenames", like in a .ZIP or .TAR file. That POSIX standard specifies that guaranteed portable filenames & pathnames contain the only the 7-bit ASCII alphanumeric characters. minus, and underscore (total of 64), plus the path separator "/" (slash). No other characters (including space) are allowed in a portable filename or pathname. Of course, the POSIX standard for portability therefore rejects all foreign alphabet characters.

The POSIX standard for portability would suggest (for example) that any portable software package (like Gallery) should only contain filenames and pathnames that are portable. That's a far cry from limiting the user on any specific OS from using any character that is valid in a filename on that native OS.

Oh, and gallerynator, if you are going to try to impress people with your credentials, you'll have to do better than only 20 years as a "computer scientist". I personally have over 40 years of professional programming experience, including a graduate degree in Computer Science and a couple of software patents. Normally I wouldn't mention all that, as it is irrelevant to the discussion at hand, but since you seemed to be impressed by such credentials ...