File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -166,12 +166,17 @@ def initialize() -> FileDB:
166
166
db = FileDB .read ()
167
167
undead = list (filter (lambda p : not p .exists (), db .files ))
168
168
for path in undead :
169
- logging .warning (
170
- "File `%s` in DB doesn't exist. Removing entry from DB." , path
171
- )
172
- del db [path ]
173
- if len (undead ) > 0 :
174
- db .write ()
169
+ if path in db .managed :
170
+ logging .warning (
171
+ "File `%s` in DB seems not to exist, but this file is managed.\n "
172
+ "This may happen every now and then with certain editors that "
173
+ "delete a file before writing." , path
174
+ )
175
+ else :
176
+ logging .warning (
177
+ "File `%s` is in database but doesn't seem to exist.\n "
178
+ "Run `entangled tangle -r` to recreate the database." , path
179
+ )
175
180
return db
176
181
177
182
FileDB .path ().parent .mkdir (parents = True , exist_ok = True )
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " entangled-cli"
3
- version = " 2.1.8 "
3
+ version = " 2.1.9 "
4
4
description = " Literate Programming toolbox"
5
5
repository = " https://github.com/entangled/entangled.py"
6
6
homepage = " https://entangled.github.io/"
You can’t perform that action at this time.
0 commit comments