Skip to content

Commit 286998c

Browse files
authored
Merge branch 'main' into fix-add
2 parents c68b35e + 244d130 commit 286998c

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Fixed JS errors in Studio on certain operations (#416)
1212
- Files are added to source control upon creation properly (#404)
1313
- Files show in uncommitted queue when automatically added (#407)
14+
- WebUI workspace view now works properly for filenames with spaces (#423)
15+
- Fixed error popups in interop editors in Studio on 2024.1 (#417)
1416

1517
## [2.4.0] - 2024-07-08
1618

csp/gitprojectsettings.csp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,8 @@ $('[id^=noFoldersSwitch]').click(toggleNoFolders);
670670
</html>
671671
<script method='OnPreHTTP' language='cache' runat='server' returntype='%Boolean'>
672672
try {
673+
set %session.UseSessionCookie = 1 // Always set back to autodetect
674+
set %session.CookiePath = "" // Always clear
673675
if (%request.UserAgent [ " Code/") {
674676
// Workaround for VSCode webview
675677
set %session.SessionScope = 0 // none; allowed because...

csp/webuidriver.csp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
set %namespace = namespace
1212

1313
try {
14+
set %session.UseSessionCookie = 1 // Always set back to autodetect
15+
set %session.CookiePath = "" // Always clear
1416
if (%request.UserAgent [ " Code/") {
1517
// Workaround for VSCode webview
1618
set %session.SessionScope = 0 // none; allowed because...

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,11 +1304,11 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent, stashedCommi
13041304
right.webuiPrevScrollTop = 0;
13051305
right.webuiPrevScrollLeft = 0;
13061306
}
1307-
webui.git("ls-files "+file, function(path){
1308-
self.gitFile = file;
1307+
webui.git("ls-files \""+file+"\"", function(path){
1308+
self.gitFile = "\"" + file + "\"";
13091309
self.noIndex = ""
13101310
if(path.length == 0 && file != undefined){
1311-
self.gitFile = " /dev/null " + file;
1311+
self.gitFile = " /dev/null " + "\"" + file + "\"";
13121312
self.noIndex = " --no-index "
13131313
}
13141314
if (self.gitCmd) {
@@ -2224,6 +2224,7 @@ webui.NewChangedFilesView = function(workspaceView) {
22242224
} else {
22252225
model = line;
22262226
}
2227+
model = model.replace(/^"(.*)"$/g,'$1');
22272228

22282229
++self.filesCount;
22292230
var isForCurrentUser;

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,11 +1304,11 @@ webui.DiffView = function(sideBySide, hunkSelectionAllowed, parent, stashedCommi
13041304
right.webuiPrevScrollTop = 0;
13051305
right.webuiPrevScrollLeft = 0;
13061306
}
1307-
webui.git("ls-files "+file, function(path){
1308-
self.gitFile = file;
1307+
webui.git("ls-files \""+file+"\"", function(path){
1308+
self.gitFile = "\"" + file + "\"";
13091309
self.noIndex = ""
13101310
if(path.length == 0 && file != undefined){
1311-
self.gitFile = " /dev/null " + file;
1311+
self.gitFile = " /dev/null " + "\"" + file + "\"";
13121312
self.noIndex = " --no-index "
13131313
}
13141314
if (self.gitCmd) {
@@ -2224,6 +2224,7 @@ webui.NewChangedFilesView = function(workspaceView) {
22242224
} else {
22252225
model = line;
22262226
}
2227+
model = model.replace(/^"(.*)"$/g,'$1');
22272228

22282229
++self.filesCount;
22292230
var isForCurrentUser;

0 commit comments

Comments
 (0)