Changeset 14040e5 in mainline


Ignore:
Timestamp:
2009-05-08T20:58:12Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4876df
Parents:
54a6ff6
Message:

Allow rename("a", "aa");

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ops.c

    r54a6ff6 r14040e5  
    953953        oldc[olen] = '\0';
    954954        newc[nlen] = '\0';
    955         if (!str_lcmp(newc, oldc, str_length(oldc))) {
    956                 /* oldc is a prefix of newc */
     955        if ((!str_lcmp(newc, oldc, str_length(oldc))) &&
     956            ((newc[str_length(oldc)] == '/') ||
     957            (str_length(oldc) == 1) ||
     958            (str_length(oldc) == str_length(newc)))) {
     959                /*
     960                 * oldc is a prefix of newc and either
     961                 * - newc continues with a / where oldc ends, or
     962                 * - oldc was / itself, or
     963                 * - oldc and newc are equal.
     964                 */
    957965                ipc_answer_0(rid, EINVAL);
    958966                free(old);
Note: See TracChangeset for help on using the changeset viewer.