On Thu, 2007-03-08 at 22:24 +0100, Luca Bellonda wrote:
> jamie ha scritto:
> > thanks but would it not be simpler to use the posix realpath? (man
> > realpath for info)
> > I am not sure if it converts "~" for us as well as allowing relative
> > paths?
> > feel free to resubmit patch using realpath if it does. If not can
> you
> > also include realpath anyhow
>
> Ok, this is the patch including realpath and some debugging info. I
> leaved '~' handling,
> it is invisible if you don't prefix a name with tilde.
thanks but it needs a bit of tidying up before I can accept it
can you do the following pls:
1) use tracker_string_replace for replacing the tilda ~
2) coding style must follow existing code (this is a golden rule of all
projects that you submit patches too)
in particular:
a) I prefer "if( '~' == input_name[0] ) {" to be this way round:
if (input_name[0] == '~') {
note space after "if" and no spaces after first bracket or before last
bracket
b) indentation should be an 8 space tab (I prefer tabs to spaces)
c) if..else should be as follows:
if (a) {
b();
} else {
c();
}
if in any doubt look at existing code
3) for function calls like "strlen(home_dir)" pls put a space between
function name and opening bracket (so should be "strlen (home_dir)")
4) I dont like doing the name check in the standard
tracker_array_to_list utility as its used for things other than
filenames
I think rename generic_array_to_list to tracker_filename_array_to_list
and add it there - also need to add to tracker-util.h as its going to be
used in other modules)
once above is done then I will be happy to accept it.
sorry to be so fussy but I have to maintain the code and keep it as
consistent as possible.
thanks
jamie.
_______________________________________________
tracker-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/tracker-list