| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.1180 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.1180 |
| Problem: When current directory changes, path from cscope may no longer be |
| valid. (AS Budden) |
| Solution: Always store the absolute path. (Christian Brabandt) |
| Files: src/if_cscope.c |
| |
| |
| |
| |
| |
| *** 539,550 **** |
| --- 539,565 ---- |
| char *fname2 = NULL; |
| char *ppath = NULL; |
| int i; |
| + #ifdef FEAT_MODIFY_FNAME |
| + int len; |
| + int usedlen = 0; |
| + char_u *fbuf = NULL; |
| + #endif |
| |
| /* get the filename (arg1), expand it, and try to stat it */ |
| if ((fname = (char *)alloc(MAXPATHL + 1)) == NULL) |
| goto add_err; |
| |
| expand_env((char_u *)arg1, (char_u *)fname, MAXPATHL); |
| + #ifdef FEAT_MODIFY_FNAME |
| + len = (int)STRLEN(fname); |
| + fbuf = (char_u *)fname; |
| + (void)modify_fname((char_u *)":p", &usedlen, |
| + (char_u **)&fname, &fbuf, &len); |
| + if (fname == NULL) |
| + goto add_err; |
| + fname = (char *)vim_strnsave((char_u *)fname, len); |
| + vim_free(fbuf); |
| + #endif |
| ret = stat(fname, &statbuf); |
| if (ret < 0) |
| { |
| |
| |
| |
| *** 730,731 **** |
| --- 730,733 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 1180, |
| /**/ |
| |
| -- |
| If Microsoft would build a car... |
| ... Occasionally, executing a maneuver such as a left turn |
| would cause your car to shut down and refuse to restart, in |
| which case you would have to reinstall the engine. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |