File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -408,7 +408,7 @@ Local
408
408
fileext = "..."
409
409
#encoding = "utf-8"
410
410
#post_hook = null
411
- #fileextignore = ".tmp"
411
+ #fileignoreext = ".tmp"
412
412
413
413
Can be used with `khal <http://lostpackets.de/khal/ >`_. See :doc: `vdir ` for
414
414
a more formal description of the format.
@@ -427,7 +427,7 @@ Local
427
427
:param post_hook: A command to call for each item creation and
428
428
modification. The command will be called with the path of the
429
429
new/updated file.
430
- :param fileextignore : The file extention to ignore,
430
+ :param fileeignoreext : The file extention to ignore,
431
431
the default is ``.tmp ``.
432
432
433
433
.. storage :: singlefile
Original file line number Diff line number Diff line change @@ -63,6 +63,17 @@ def test_ignore_tmp_files_empty_fileext(self, tmpdir):
63
63
# assert False, tmpdir.listdir() # enable to see the created filename
64
64
assert len (list (s .list ())) == 1
65
65
66
+ def test_ignore_files_typical_backup (self , tmpdir ):
67
+ """Test file-name ignorance with typical backup ending ~."""
68
+ ignorext = "~" # without dot
69
+ s = self .storage_class (str (tmpdir ), '' , fileignoreext = "~" )
70
+ s .upload (Item ('UID:xyzxyz' ))
71
+ item_file , = tmpdir .listdir ()
72
+ item_file .copy (item_file .new (basename = item_file .basename + '~' ))
73
+ assert len (tmpdir .listdir ()) == 2
74
+ #assert False, tmpdir.listdir() # enable to see the created filename
75
+ assert len (list (s .list ())) == 1
76
+
66
77
def test_too_long_uid (self , tmpdir ):
67
78
s = self .storage_class (str (tmpdir ), ".txt" )
68
79
item = Item ("UID:" + "hue" * 600 )
You can’t perform that action at this time.
0 commit comments