Re: [BUG] 'stg add FILE' when FILE is a symlink to dir adds dir contents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2007-04-11 19:54:52 +0400, Tomash Brechko wrote:

> I have no knowledge of Python, so I can't fix it myself, but perhaps
> one should check for symlink before 'if os.path.isdir(i):'.

Correct. From the Python library reference:

  isdir(path)
    Return True if path is an existing directory. This follows
    symbolic links, so both islink() and isdir() can be true for the
    same path.

So, os.path.islink() would be the function to use.

-- 
Karl Hasselström, kha@xxxxxxxxxxx
      www.treskal.com/kalle
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]