Fossil SCM
Fix a bug in undo associated with symlinks.
Commit
56d624f6e20fe0d339fad3b8705bb90b82e45e86
Parent
172580e0a427d33…
1 file changed
+3
-1
+3
-1
| --- src/undo.c | ||
| +++ src/undo.c | ||
| @@ -271,12 +271,14 @@ | ||
| 271 | 271 | Stmt q; |
| 272 | 272 | |
| 273 | 273 | if( !undoActive ) return; |
| 274 | 274 | zFullname = mprintf("%s%s", g.zLocalRoot, zPathname); |
| 275 | 275 | existsFlag = file_size(zFullname)>=0; |
| 276 | + isLink = file_islink(zFullname); | |
| 276 | 277 | 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)" | |
| 278 | 280 | " VALUES(%Q,0,%d,%d,%d,:c)", |
| 279 | 281 | zPathname, existsFlag, file_isexe(zFullname), file_islink(zFullname) |
| 280 | 282 | ); |
| 281 | 283 | if( existsFlag ){ |
| 282 | 284 | if( isLink ){ |
| 283 | 285 |
| --- 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 |