Skip to content

Handle empty directory passed on the command line.

rsquared requested to merge rsquared/kphotoalbum:master into master

If the user specifies a directory rather than a filename on the command line, KPhotoalbum will remove the last component of the directory pathname and offer to create index.xml in the parent directory. If the user happens to have an index.xml in the parent directory (as I did), kpa will start scanning for images under the parent directory with no feedback to the user.

This patch adds an additional check for a directory, and appends index.xml in that case.

To reproduce the original issue:

mkdir ~/foo
kphotoalbum --db ~/foo

kpa will offer to create ~/index.xml, or if index.xml happens to exist then kpa will silently start searching for images under ~ which mysteriously can take a long time.

Edited by rsquared

Merge request reports