• P
    block: simplify path_is_absolute · f53f4da9
    Paolo Bonzini 提交于
    On Windows, all the logic is already in is_windows_drive and
    is_windows_drive_prefix.  On POSIX, there is no need to look
    out for colons.
    
    The win32 code changes the behaviour in some cases, we could have
    something like "d:foo.img". The old code would treat it as relative
    path, the new one as absolute. Now the path is absolute, because to
    go from c:/program files/blah to d:foo.img you cannot say c:/program
    files/blah/d:foo.img.  You have to say d:foo.img.  But you could also
    say it's relative because (I think, at least it was like that in DOS
    15 years ago) d:foo.img is relative to the current path of drive D.
    Considering how path_is_absolute is used by path_combine, I think it's
    better to treat it as absolute.
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    f53f4da9
block.c 118.3 KB