Excuse me,
I use Swiki in a Fat32 Partition, running it under Linux or Windows.
I have found a strange error with Squeak2.7VM
Under Linux, if I have the pages named for instance 1.xml, 2.xml, ecc
all works fine.
But if I have pages named 1.XML, 2.XML and so on
the Swiki Server do not find them properly.
This small problem depends on the FAT32 and can affect also other config
files.
Linux kernel ignore case under FAT32, so it is a bit strange...
The same problems can happen under Windows9x with the Squeak-win-VM.
This small fix has solved the problem.
Ciao ciao!
--
// Giovanni "Daitan" Giorgi
// http://www.egroups.com/group/powertalk/info.html
\\ Amor, ch'a nullo amato amar perdona.
// [Dante, Inferno Canto V: Paolo e Francesca]
//mailto: [EMAIL PROTECTED] GSM: +39-(0)328-26-95-105
'From Squeak2.7 of 5 January 2000 [latest update: #1762] on 4 October 2000 at 7:35:46
pm'!
"Change Set: FixCaseProblemFat32
Date: 4 October 2000
Author: Giovanni Giorgi
I use Swiki in a Fat32 Partition, running it under Linux or Windows.
I have found a strange error with Squeak2.7VM
Under Linux, if I have the pages named for instance 1.xml, 2.xml, ecc
all works fine.
But if I have pages named 1.XML, 2.XML and so on
the Swiki Server do not find them properly.
This small problem depends on the FAT32 and can affect also other config
files.
Linux kernel ignore case under FAT32, so it is a bit strange...
The same problems can happen under Windows9x with the Squeak-win-VM.
This small fix has solved the problem. Hope this help!!"!
!XmlSwikiStorage methodsFor: 'pages' stamp: 'gg 10/4/2000 19:33'!
loadPages
| id pages page files |
pages _ OrderedCollection new.
id _ 1.
files _ dir fileNames.
"Small Fix of the case-sensitive pae loading on a fat32 partition [GG]"
[(files includes: (id asString, '.xml')) or: [files includes: (id asString,
'.XML')]] whileTrue: [
page _ NuSwikiPage new id: id; versionId: 0; storage: self.
self loadPage: page.
pages add: page.
id _ id + 1].
^pages! !
!XmlSwikiStorage methodsFor: 'pages' stamp: 'gg 10/4/2000 19:19'!
writePage: aPage
| file |
"Delete Old Version"
"Small Fix for a Bug on file name case conventions [GG]"
dir deleteFileNamed: ((self pathFrom: aPage) asLowercase).
"Header"
file _ dir newFileNamed: (self pathFrom: aPage).
file nextPutAll: '<?xml version="1.0"?>', String cr.
file nextPutAll: '<page>', String cr.
"Version"
file nextPutAll: '<version date="'.
file nextPutAll: (aPage date dayOfMonth asString, '/', aPage date monthIndex
asString, '/', aPage date year asString).
file nextPutAll: '" time="'.
aPage time printOn: file.
file nextPutAll: '" user="', aPage user, '" />', String cr.
"Settings"
file nextPutAll: '<settings>', String cr.
file nextPutAll: (self class settingsStringFrom: aPage settings).
file nextPutAll: '</settings>', String cr.
"Name"
file nextPutAll: '<name>'.
ToXml format: aPage name onTo: file.
file nextPutAll: '</name>', String cr.
"Text"
file nextPutAll: '<text>'.
self addTextFrom: aPage to: file.
file nextPutAll: '</text>', String cr.
file nextPutAll: '</page>'.
file close.! !