git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Karl Hasselström <kha@treskal.com>
Date
Apr 12, 2007, 06:58 UTC
Message-ID
<20070412065810.GA22949@diana.vm.bytemark.co.uk>
In-Reply-To
<20070411155452.GL5329@moonlight.home>
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@treskal.com
      www.treskal.com/kalle
Previous: Tomash BrechkoNext: Catalin Marinas
Message 2 of 3 in “[BUG] 'stg add FILE' when FILE is a symlink to dir adds dir contents”
  1. Tomash BrechkoApr 11, 2007
  2. Karl HasselströmApr 12, 2007
  3. Catalin MarinasApr 13, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.