On Thu, Sep 1, 2011 at 6:41 PM, Jim Nelson <[email protected]> wrote:

> When we first started Shotwell, we avoided symlinks because they open up a
> number of issues we preferred not have to face up front, such as broken
> links, directory loops, and who knows what else.  Over time we added some
> support: the auto-import and directory monitoring features do support
> symlinks for directories (for some specific use cases we felt we needed to
> support), but not with files themselves.
>

I've been messing around with the attached patch which makes the simple
changes to allow Shotwell's monitoring to use symlinked photos and videos.
A similar change could be made to BatchImport.vala:1411 to allow the same
when doing "manual" imports, but I haven't tested it yet.  query_for_info
will return a FileInfo that still has file_type SYMBOLIC_LINK for broken
symlinks, so those would still not get imported.

I don't think those changes would allow Shotwell to notice when a symlink
goes bad, but that's more than I need right now.

We have a ticket to support symlinks completely:
> http://redmine.yorba.org/issues/2983  I don't know that we would want to
> install FileMonitors for each linked file, however, since there is a hard
> limit each process can create.  The general strategy we've used in directory
> monitoring is to install a single directory monitor and watch the files it
> contains.
>

For my purposes that's good enough.  It's true that symbolic links could in
principle point outside the directory tree, and while it would be better if
we could notice changes to them, that could lead to an explosion of monitors
(at worst, one for each symlink if each symlink points to a new directory).

What would be necessary for you to apply a patch like this one?  Would you
want symlink support to be utterly bulletproof?  Broken symlinks should be
noticed and counted as "missing"?  Monitors installed on places where
symlinks point?  I'm willing to do the legwork if I know what the
requirements are.

Ethan
_______________________________________________
Shotwell mailing list
[email protected]
http://lists.yorba.org/cgi-bin/mailman/listinfo/shotwell

Reply via email to