Fossil SCM

Create a test file with spaces in its name, in a test directory with spaces in its name. Use these to help verify that fossil can handle file and directory names containing space characters.

drh 2020-05-09 13:34 trunk
Commit ccf6a361f3f4bbd625dc37b741b89cf525020052be7c38bc42019f366a913c31
+2 -2
--- src/browse.c
+++ src/browse.c
@@ -296,11 +296,11 @@
296296
zFN++;
297297
@ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
298298
}else{
299299
const char *zLink;
300300
if( zCI ){
301
- zLink = href("%R/file/%T%T?ci=%!S",zPrefix,zFN,zCI);
301
+ zLink = href("%R/file?name=%T%T&ci=%!S",zPrefix,zFN,zCI);
302302
}else{
303303
zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
304304
}
305305
@ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
306306
}
@@ -853,11 +853,11 @@
853853
nDir++;
854854
}else if( !showDirOnly ){
855855
const char *zFileClass = fileext_class(p->zName);
856856
char *zLink;
857857
if( zCI ){
858
- zLink = href("%R/file/%T?ci=%!S",p->zFullName,zCI);
858
+ zLink = href("%R/file?name=%T&ci=%!S",p->zFullName,zCI);
859859
}else{
860860
zLink = href("%R/finfo?name=%T",p->zFullName);
861861
}
862862
@ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
863863
@ %z(zLink)%h(p->zName)</a>
864864
865865
ADDED test/subdir with spaces/filename with spaces.txt
--- src/browse.c
+++ src/browse.c
@@ -296,11 +296,11 @@
296 zFN++;
297 @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
298 }else{
299 const char *zLink;
300 if( zCI ){
301 zLink = href("%R/file/%T%T?ci=%!S",zPrefix,zFN,zCI);
302 }else{
303 zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
304 }
305 @ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
306 }
@@ -853,11 +853,11 @@
853 nDir++;
854 }else if( !showDirOnly ){
855 const char *zFileClass = fileext_class(p->zName);
856 char *zLink;
857 if( zCI ){
858 zLink = href("%R/file/%T?ci=%!S",p->zFullName,zCI);
859 }else{
860 zLink = href("%R/finfo?name=%T",p->zFullName);
861 }
862 @ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
863 @ %z(zLink)%h(p->zName)</a>
864
865 DDED test/subdir with spaces/filename with spaces.txt
--- src/browse.c
+++ src/browse.c
@@ -296,11 +296,11 @@
296 zFN++;
297 @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>
298 }else{
299 const char *zLink;
300 if( zCI ){
301 zLink = href("%R/file?name=%T%T&ci=%!S",zPrefix,zFN,zCI);
302 }else{
303 zLink = href("%R/finfo?name=%T%T",zPrefix,zFN);
304 }
305 @ <li class="%z(fileext_class(zFN))">%z(zLink)%h(zFN)</a></li>
306 }
@@ -853,11 +853,11 @@
853 nDir++;
854 }else if( !showDirOnly ){
855 const char *zFileClass = fileext_class(p->zName);
856 char *zLink;
857 if( zCI ){
858 zLink = href("%R/file?name=%T&ci=%!S",p->zFullName,zCI);
859 }else{
860 zLink = href("%R/finfo?name=%T",p->zFullName);
861 }
862 @ <li class="%z(zFileClass)%s(zLastClass)"><div class="filetreeline">
863 @ %z(zLink)%h(p->zName)</a>
864
865 DDED test/subdir with spaces/filename with spaces.txt
--- a/test/subdir with spaces/filename with spaces.txt
+++ b/test/subdir with spaces/filename with spaces.txt
@@ -0,0 +1,2 @@
1
+This file has a name that contains spaces. It is used to help verify
2
+that fossil can handle filenames that contain spaces.
--- a/test/subdir with spaces/filename with spaces.txt
+++ b/test/subdir with spaces/filename with spaces.txt
@@ -0,0 +1,2 @@
 
 
--- a/test/subdir with spaces/filename with spaces.txt
+++ b/test/subdir with spaces/filename with spaces.txt
@@ -0,0 +1,2 @@
1 This file has a name that contains spaces. It is used to help verify
2 that fossil can handle filenames that contain spaces.

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button