Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#16 ircp only receives to / directory

closed
nobody
None
5
2007-06-02
2003-04-09
Anonymous
No

If I use the command ircp -r then the received file is always put in
the / directory no matter which directory I'm in at the time.
If I specify a directory that does not exist, then it tells me that the
destination directory does not exist.
It I specify dot thjen it still goes in /

This is Kernel 2.4.7-10

Discussion

  • Logged In: NO

    Yeah well, depending on your point of view, there's a bug in ircp_io.c. It
    all depends on the variable "path" which for me is always an empty
    string.

    In ircp_open_safe you need to change the call to snprintf to...

    if (strlen(path) == 0)
    snprintf(newpath, MAXPATHLEN, "%s", dir);
    else
    snprintf(newpath, MAXPATHLEN, "%s/%s", path, dir);

    ... and again in ircp_checkdir

    because if path contains a null string then the filename starts with a "/"

     
  • Logged In: NO

    Yeah well, depending on your point of view, there's a bug in ircp_io.c. It
    all depends on the variable "path" which for me is always an empty
    string.

    In ircp_open_safe you need to change the call to snprintf to...

    if (strlen(path) == 0)
    snprintf(newpath, MAXPATHLEN, "%s", dir);
    else
    snprintf(newpath, MAXPATHLEN, "%s/%s", path, dir);

    ... and again in ircp_checkdir

    because if path contains a null string then the filename starts with a "/"

     
  • Diletti Marco
    Diletti Marco
    2003-10-24

    Logged In: YES
    user_id=894228

    In ircp_server.c, I have changed the line 234:

    darkmoon:/tmp/ircp-0.3/src# diff -p ircp_server.c
    ircp_server.old.c
    234c234
    < srv->fd = ircp_open_safe(srv->inbox, name);
    ---
    > srv->fd = ircp_open_safe("", name);

    in order to fix this problem

     
    • status: open --> closed