Skip to content

Commit ea2cc0a

Browse files
committed
Fix Reference tests which copy the git directory
Delphi 2007 was failing to copy the git directory with ShellAPI.ShFileOperation(), while D2009 was not failing probably because it uses the WideChar version of the WINAPI function.
1 parent 1b147dd commit ea2cc0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

TestsFromLibGit2/uTestsFromLibGit2.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ function TTestFromLibGit2.copydir_recurs(const fromDir, toDir: string): Boolean;
232232

233233
fos.wFunc := FO_COPY;
234234
fos.fFlags := FOF_FILESONLY;
235-
fos.pFrom := PChar(fromDir);
236-
fos.pTo := PChar(toDir);
235+
fos.pFrom := PChar(fromDir + #0);
236+
fos.pTo := PChar(toDir + #0);
237237

238238
Result := (0 = ShellAPI.ShFileOperation(fos));
239239
end;

0 commit comments

Comments
 (0)