pan-users
[Top][All Lists]
Advanced

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

[Pan-users] request - preference to not download duplicate


From: Pedro
Subject: [Pan-users] request - preference to not download duplicate
Date: Wed, 29 Mar 2017 17:38:08 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

hi,

thanks for 'being there' for pan development.

something I would like to see if preferences for duplicates

at present pan looks for existing and appends a '_copy_x' to the filename, where x is a subsequent number, usually copy_2

it would be trivial, so trivial I will do this and recompile, to either ignore duplicates, which saves me from downloading it, or to overwrite newer or larger files.

more specifically.

decoder.cc calls getuniquefilename , which puts copy into it.
should be able to cancel all cop1_? decodes

char * fname = file::get_unique_fname(save_path.c_str(),
                                              (item->filename
                                               && *item->filename)
                                              ? item->filename
                                              : "pan-saved-file" )

so like if fname == *copy_?, ignore it and do not decode if preferences are set that way. though better to return null in file-util.cc which is called there (I assume)..

specifically char*

file :: get_unique_fname

  else if (is_nonempty_string(path))
      {
         unique = g_strdup_printf ("%s%c%s_copy_%d%s",
                             path, G_DIR_SEPARATOR,
                             lead, i, tail);

**


another suggestion would be for an import/export of headers for backup purposes... some of these are gigabytes these days.


examples of regex with pan would be good too.


thanks




reply via email to

[Prev in Thread] Current Thread [Next in Thread]