How to specify files for exclusion?

Asked by Sagar Behere on 2011-06-27

I am trying to specify which files should be excluded from backups. I proceeded as follows (Time Drive v 0.4, Ubuntu 10.04 amd64, installed from ppa):

0. Under Settings, in the Exclude tab, I clicked on the Add button
1. In the popup dialog, I tried entering various regular expressions, for example

.* [to exclude all hidden files]
*~ [to exclude all files ending in ~]

and various other regexs that work fine with rsync, for example.

However, no matter what I enter, when I press 'Ok', I get the an error dialog with the message
"Error regular expressions"

Am I doing something wrong?

Thanks in advance,

Question information

English Edit question
Time Drive Edit question
No assignee Edit question
Last query:
Last reply:
clee (chris-leemesser) said : #1

There is a typo in the 0.4 version of time-drive in timedrive/ about on line68

if not self._Validate.check(self.Validate.REGEX, excludePattern):

needs to be
if not self._Validate.check(self._Validate.REGEX, excludePattern):

The try/except around this portion was masking the syntax error.

Here is a potential patch.

--- a/timedrive/ Tue Jul 12 08:24:03 2011 -0700
+++ b/timedrive/ Tue Jul 12 08:01:08 2011 -0700
@@ -65,15 +65,11 @@
     if excludePattern == None:
      return e

- if not self._Validate.check(self._Validate.REGEX, excludePattern):
+ if not self._Validate.check(self.Validate.REGEX, excludePattern):
      QtGui.QMessageBox.warning(self, _("Invalid"), _("Invalid regular expressions"))

     e = excludeitem.ExcludeItem(excludePattern, excludeType)
- import traceback, sys
- tp, val, tb = sys.exc_info()
- traceback.print_exception(tp,val,tb)
     QtGui.QMessageBox.warning(self, _("Exception"), _("Error regular expressions"))

   elif excludeType == excludeitem.ExcludeItem.FOLDER:
@@ -81,4 +77,4 @@
   elif excludeType == excludeitem.ExcludeItem.FILE:
    e = excludeitem.ExcludeItem(excludePattern, excludeType)

- return e
+ return e
\ No newline at end of file

Can you help with this problem?

Provide an answer of your own, or ask Sagar Behere for more information if necessary.

To post a message you must log in.