Ubuntu One Folder Sync Filter

Posted by Andy Barlow on Stack Overflow See other posts from Stack Overflow or by Andy Barlow
Published on 2010-06-09T12:08:03Z Indexed on 2010/06/09 12:12 UTC
Read the original article Hit count: 367

Hi, I am trying to modify the Ubuntu One File syncing python scripts to not including things like .iso's.

I have got as far as finding this file: /usr/share/pyshared/ubuntuone/u1sync/constants.py

Inside is this piece of code:

import re

# the name of the directory u1sync uses to keep metadata about a mirror
METADATA_DIR_NAME = u".ubuntuone-sync"

# filenames to ignore
SPECIAL_FILE_RE = re.compile(".*\\.("
                             "(u1)?partial|part|"
                             "(u1)?conflict(\\.[0-9]+)?)$")

How can I edit this last section (regex?) and make it ignore .iso files??? I'm fairly sure this is the place to put it!

Pretty sure this is standard python action :)

Any help would be appreciated.

Thanks kindly.

Andy

© Stack Overflow or respective owner

Related posts about python

Related posts about ubuntu