Don't complain about non-accessable excluded files

Bug #980786 reported by Bernd Wurst
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sbackup
Status tracked in Trunk
0.11
Fix Released
Low
Unassigned
Trunk
Fix Released
Low
Unassigned

Bug Description

On one of my desktop systems, the folder ~/.gvfs is inaccessable from time to time. That means, the directory entry looks like that:
  d????????? ? ? ? ? ? .gvfs

The reason for this is out of scope here and the file is excluded (by default in sbackup config).

But sbackup complains about this on every run:
2012-04-13 14:23:12,209 - WARNING: File '/home/xxxxx/.gvfs' does not exist.

I have had a look in the code and I think in file src/util/filecollect.py, in _check_for_excludes(), the first if-elif-conditions should be interchanged. For the moment, sbackup first looks if the file *can* be accessed and after that, it looks if the file *should* be accessed.
If this would be the other way round, There won't be complains about my .gvfs not being accessable.

As far as I can see, 0.11.4 and trunk are nearly identical (in this scope).

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

Thanks for this report and your suggestion. I've modified the order of checks. This should fix your issue.
Best regards.

Revision history for this message
Bernd Wurst (berndwurst) wrote :

Thank you for the fix!

I downloaded branch 0.11 from bzr and installed it locally. As I still got the very same warning about the non existing file, I investigated further.

I fixed it by changing the exclude rule to not include the trailing slash after .gvfs. The rule was introduce as fix for bug #222898 as a default rule. Removing the trailing / from this rule is good for me but possibly nothing to be done in the default config.

How could this be solved correctly? Rules with a trailing / must only apply to directories but to know about this, you need to call stat().

Revision history for this message
Jean-Peer Lorenz (peer.loz) wrote :

> How could this be solved correctly? Rules with a trailing / must only apply to directories but to know about this, you need to call stat().

I agree and don't see another way than modifying the regular expressions.

I've opened a separate bug to handle this isse and commited a fix: Regular expressions defined in default configuration can be improved (LP #1097465). The default RegExs as of now read:

+ self._regex_excludes = "^/home/[^/]+?/\.gvfs(/|$),"\
+ "^/home/[^/]+?/\.thumbnails(/|$),"\
+ "^/home/[^/]+?/\..+/[tT]rash(/|$),"\
+ "^/home/[^/]+?/\.cache(/|$),"\
+ "^/home/[^/]+?/\..+/[cC]ache(/|$),"\
+ "^/home/[^/]+?/\..+/lock(/|$),"\
                                "~$"

Using this expressions and the fix pushed for this bug (LP #980786) should remove all remaining unwanted warnings and errors from your log.

regards,
jean-peer

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.