Skip to content

Commit 4d9f22f

Browse files
authored
Merge pull request #568 from intersystems/fix-filename-space
Workspace view displays filenames with spaces
2 parents d2a5079 + 04ca6a0 commit 4d9f22f

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
- Production configuration page no longer closes Sync/WebUI when operations there change the production (#542)
3434
- Remove leading/trailing spaces from input to Configure() (#356)
3535
- Fix branches with special characters not showing in GitUI (#523)
36+
- Fix filenames with spaces not showing correctly in workspace view (#551)
3637
- Removed inaccurate placeholder text for commit message in UI (#406)
3738

3839
## [2.6.0] - 2024-10-07

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,16 +2560,10 @@ webui.NewChangedFilesView = function(workspaceView) {
25602560
} else {
25612561
model = line;
25622562
}
2563-
model = model.replace(/^"(.*)"$/g,'$1');
2563+
model = model.replace(/^"(.*)"$/g,'$1').trim();
25642564

25652565
++self.filesCount;
2566-
var isForCurrentUser;
2567-
if(model.indexOf(" ") > -1){
2568-
isForCurrentUser = (uncommittedItems.indexOf(model.substring(1, model.length-1)) > -1);
2569-
} else {
2570-
isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
2571-
}
2572-
2566+
var isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
25732567
if (isForCurrentUser) {
25742568
addItemToFileList(fileList, indexStatus, workingTreeStatus, model, false);
25752569
} else {

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,16 +2560,10 @@ webui.NewChangedFilesView = function(workspaceView) {
25602560
} else {
25612561
model = line;
25622562
}
2563-
model = model.replace(/^"(.*)"$/g,'$1');
2563+
model = model.replace(/^"(.*)"$/g,'$1').trim();
25642564

25652565
++self.filesCount;
2566-
var isForCurrentUser;
2567-
if(model.indexOf(" ") > -1){
2568-
isForCurrentUser = (uncommittedItems.indexOf(model.substring(1, model.length-1)) > -1);
2569-
} else {
2570-
isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
2571-
}
2572-
2566+
var isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
25732567
if (isForCurrentUser) {
25742568
addItemToFileList(fileList, indexStatus, workingTreeStatus, model, false);
25752569
} else {

0 commit comments

Comments
 (0)