Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffing is broken if there is a space in a folder name #158

Closed
dtb49 opened this issue May 28, 2024 · 2 comments
Closed

Diffing is broken if there is a space in a folder name #158

dtb49 opened this issue May 28, 2024 · 2 comments

Comments

@dtb49
Copy link

dtb49 commented May 28, 2024

Probably a pretty silly issue but, finally after debugging for a while a co-worker found this fix to a diffing bug. If a folder contains a space then all diffing attempts will end with the following error:

LogSourceControl: RunDumpToFile: 'git -C "D:/simvana-anesthesia" cat-file --filters e1c91607b25fbae7289316a3d74b1c51ac10272c:Unreal Projects/Anesthesia/Content/Anesthesia/Base/Components/SC_Base_DisplayScreen.uasset'
LogSourceControl: Error: DumpToFile: ReturnCode=129

We tracked it to the RunDumpToFile function line 1776 of GitSourceControlUtils.cpp
if you change this line to the following below it seems to resolve the issue.

FullCommand += TEXT("\"") + InParameter + TEXT("\"");

Obviously this can be prevented by not allowing spaces in folder names but, we were converting a legacy project to git and came across this.

@mastercoms
Copy link
Member

Thanks! We definitely want to catch and fix anything like that. It's very silly for software not to support spaces in file names.

@mastercoms
Copy link
Member

I've applied your suggested fix, but I definitely would rather at some point to go through and see if we can pass in a safe arguments array so we don't have to do unsafe string manipulation to accumulate parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants