Fossil SCM

Fix a bug in undo associated with symlinks.

drh 2011-09-02 12:33 trunk
Commit 56d624f6e20fe0d339fad3b8705bb90b82e45e86
1 file changed +3 -1
+3 -1
--- src/undo.c
+++ src/undo.c
@@ -271,12 +271,14 @@
271271
Stmt q;
272272
273273
if( !undoActive ) return;
274274
zFullname = mprintf("%s%s", g.zLocalRoot, zPathname);
275275
existsFlag = file_size(zFullname)>=0;
276
+ isLink = file_islink(zFullname);
276277
db_prepare(&q,
277
- "INSERT OR IGNORE INTO undo(pathname,redoflag,existsflag,isExe,isLink,content)"
278
+ "INSERT OR IGNORE INTO"
279
+ " undo(pathname,redoflag,existsflag,isExe,isLink,content)"
278280
" VALUES(%Q,0,%d,%d,%d,:c)",
279281
zPathname, existsFlag, file_isexe(zFullname), file_islink(zFullname)
280282
);
281283
if( existsFlag ){
282284
if( isLink ){
283285
--- src/undo.c
+++ src/undo.c
@@ -271,12 +271,14 @@
271 Stmt q;
272
273 if( !undoActive ) return;
274 zFullname = mprintf("%s%s", g.zLocalRoot, zPathname);
275 existsFlag = file_size(zFullname)>=0;
 
276 db_prepare(&q,
277 "INSERT OR IGNORE INTO undo(pathname,redoflag,existsflag,isExe,isLink,content)"
 
278 " VALUES(%Q,0,%d,%d,%d,:c)",
279 zPathname, existsFlag, file_isexe(zFullname), file_islink(zFullname)
280 );
281 if( existsFlag ){
282 if( isLink ){
283
--- src/undo.c
+++ src/undo.c
@@ -271,12 +271,14 @@
271 Stmt q;
272
273 if( !undoActive ) return;
274 zFullname = mprintf("%s%s", g.zLocalRoot, zPathname);
275 existsFlag = file_size(zFullname)>=0;
276 isLink = file_islink(zFullname);
277 db_prepare(&q,
278 "INSERT OR IGNORE INTO"
279 " undo(pathname,redoflag,existsflag,isExe,isLink,content)"
280 " VALUES(%Q,0,%d,%d,%d,:c)",
281 zPathname, existsFlag, file_isexe(zFullname), file_islink(zFullname)
282 );
283 if( existsFlag ){
284 if( isLink ){
285

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button