Check-in [d99958bdd3]
Overview
Comment:Ensure consistent UTF-8 encoding is applied throughout the file handling process
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d99958bdd3dd539161097f92b907fdf52a69e25f11a5c654c397138dd9386cda
User & Date: rkeene on 2019-05-03 22:38:42
Other Links: manifest | tags
Context
2019-05-03
22:42
Renamed getInfo to getStat, for clarity check-in: daf25f5222 user: rkeene tags: trunk
22:38
Ensure consistent UTF-8 encoding is applied throughout the file handling process check-in: d99958bdd3 user: rkeene tags: trunk
22:30
Slightly better optimizations check-in: 73cbe7370b user: rkeene tags: trunk
Changes

Modified lib/xvfs/xvfs.tcl from [926dd90266] to [4eccde71d3].

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
	set children [list]
	foreach file [glob -nocomplain -tails -directory $workingDirectory *] {
		if {$file in {. ..}} {
			continue
		}

		set inputFile [file join $workingDirectory $file]
		set outputFile [file join $outputDirectory $file]

		unset -nocomplain fileInfo
		catch {
			file lstat $inputFile fileInfo
		}
		if {![info exists fileInfo]} {
			puts stderr "warning: Unable to access $inputFile, skipping"







|







144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
	set children [list]
	foreach file [glob -nocomplain -tails -directory $workingDirectory *] {
		if {$file in {. ..}} {
			continue
		}

		set inputFile [file join $workingDirectory $file]
		set outputFile [file join $outputDirectory [encoding convertto utf-8 $file]]

		unset -nocomplain fileInfo
		catch {
			file lstat $inputFile fileInfo
		}
		if {![info exists fileInfo]} {
			puts stderr "warning: Unable to access $inputFile, skipping"

Modified xvfs.c.rvt from [da060cbcb2] to [83b306157f].

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
	}
	
	foreach {outputFileHash outputFileIndexes} [lsort -stride 2 -dictionary [array get outputFileHashToIndex]] {
?>		case <?= $outputFileHash ?>:
<?
			foreach outputFileIndex $outputFileIndexes {
				set outputFileName [lindex $::xvfs::outputFiles $outputFileIndex]
				set outputFileName [encoding convertto utf-8 $outputFileName]
				set outputFileNameLen [string length $outputFileName]
?>			if (pathLen == <?= $outputFileNameLen ?> && memcmp(path, xvfs_<?= $::xvfs::fsName ?>_data[<?= $outputFileIndex ?>].name, pathLen) == 0) {
				return(<?= $outputFileIndex ?>);
			}
<?
			}
?>			break;







<







49
50
51
52
53
54
55

56
57
58
59
60
61
62
	}
	
	foreach {outputFileHash outputFileIndexes} [lsort -stride 2 -dictionary [array get outputFileHashToIndex]] {
?>		case <?= $outputFileHash ?>:
<?
			foreach outputFileIndex $outputFileIndexes {
				set outputFileName [lindex $::xvfs::outputFiles $outputFileIndex]

				set outputFileNameLen [string length $outputFileName]
?>			if (pathLen == <?= $outputFileNameLen ?> && memcmp(path, xvfs_<?= $::xvfs::fsName ?>_data[<?= $outputFileIndex ?>].name, pathLen) == 0) {
				return(<?= $outputFileIndex ?>);
			}
<?
			}
?>			break;