<section id="Cameraimport">\r
<title>Camera import</title>\r
<para>Imports images from an attached camera to the current folder. If a file with the same name already exists it will not be overwritten, and the new image will not be downloaded.</para>\r
+ <para>File names on digital cameras are not necessarily unique. In some cases the same file name can exist in more than one sub-folder on the camera. As existing images will not be overwritten, subsequent files of the same name will not be downloaded. In this case a dialog will be shown to warn you of this.</para>\r
+ <para>\r
+ You may use the gphoto2 option\r
+ <code>--filename</code>\r
+ option to ensure that all filenames are unique when downloading. Refer to the\r
+ <ulink url="http://www.gphoto.org/doc/manual/ref-gphoto2-cli.html">gphoto2 documentation.</ulink>\r
+ </para>\r
<para>\r
This item is displayed in the\r
<emphasis role="strong">Plugins</emphasis>\r
ls -1 | sort > $dest_files_sorted
existing_file_count=$(comm -12 $src_files_sorted $dest_files_sorted | wc -l)
+repeated=$(uniq --repeated $src_files_sorted)
+if [ ! -z "$repeated" ]
+then
+ repeated="Warning: The following source filenames are not unique.\nSome files may not be downloaded.\nSee the Help file.\n\n$repeated"
+ zenity --question --text="$repeated" --title="Geeqie camera import" --cancel-label="OK" --ok-label="Cancel" --width=400 --window-icon=/usr/local/share/pixmaps/geeqie.png 2>/dev/null
+ if [[ $? == 0 ]]
+ then
+ exit 1
+ fi
+fi
+
total=$(cat $src_files_sorted | wc -l)
files_to_load=$(( $total - $existing_file_count ))