Menu

#755 SaveAs does not update relative dir and lib paths in project

Undefined
open
nobody
None
Bug_Report
2018-10-19
2018-10-19
Jannick
No

When saving a project containing relative paths (files, directories, libraries), the paths of the project files are properly handled, those of directories (include, link) are seemingly not.

Example to reproduce (based on attached zip). Please have a quick glance at the following project file tree which is the most simple one I could think of to produce the issue:

.\SAVEASPROJECT
|   cbws.tree
|   SaveAsProject.workspace
|   
+---a
|   |   Lib.cbp
|   |   Main.cbp
|   |   
|   \---b
+---include
|       print.h
|       
+---lib
\---src
        main.c
        print.c

The basic idea is to SaveAs Main.cbp from ./a to ./a/b.

Main.cbp has a single code file, main.c, which is linked against the library libprint.a (in ./lib). The lib itself depends on print.c only. In this example libprint.a remains where it is and is build by Lib.cbp.

So follow these steps:

  1. unzip the attachment
  2. open the workspace file SaveAsProject.workspace
  3. run target Debug of the lib project ... should be OK
  4. run target Debug of the main project ... should be OK
  5. SaveAs the main project in the folder ./a/b
  6. run target Debug in the new main project: while main.c is found (i.e. SaveAs updated its relative path), the -I path to folder include needs to be manually updated (print.h), and so is the -L path to the folder lib.

I would expect CB to take care of updating relative dir and lib paths. There might be more relative paths to be updated which are not covered by this example.

Using Oct 2018 nightly build on Win10.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.