note about commonFolder()

This commit is contained in:
Basile Burg 2015-05-07 10:44:30 +02:00
parent d0f2b1c266
commit 23666992a4
2 changed files with 3 additions and 1 deletions

View File

@ -813,6 +813,7 @@ begin
end;
end;
//TODO-cfeature: make it working with relative paths
function commonFolder(const someFiles: TStringList): string;
var
i,j,k: integer;

View File

@ -414,12 +414,13 @@ var
if dlgOkCancel( 'The project source(s) are all missing. ' + LineEnding +
'This can be encountered if the project file has been moved from its original location.' + LineEnding + LineEnding +
'Do you wish to select the new root folder ?') <> mrOk then exit;
// TODO-cimprovement: use commonFolder() when it'll be compat. with the rel. paths.
// hint for the common dir
dirHint := fSrcs.Strings[i];
while (dirHint[1] = '.') or (dirHint[1] = DirectorySeparator) do
dirHint := dirHint[2..length(dirHint)];
ini := extractFilePath(fFilename);
if not selectDirectory( format('select the folder (which contains "%s")',[dirHint]), ini, newdir) then
if not selectDirectory( format('select the folder (that contains "%s")',[dirHint]), ini, newdir) then
exit;
for i := 0 to fSrcs.Count-1 do
begin