Diff

Differences From Artifact [5164175ffc]:

To Artifact [13bdfa17c6]:


167
168
169
170
171
172
173
174

175
176
177
178
179
180
181
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181







-
+







		}

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

		if {[info command ::xvfs::callback::setOutputFileName] ne ""} {
			set outputFile [::xvfs::callback::setOutputFileName $file $workingDirectory $inputFile $outputDirectory $outputFile]
			if {$outputFile eq ""} {
			if {$outputFile eq "/"} {
				continue
			}
		}

		unset -nocomplain fileInfo
		catch {
			file lstat $inputFile fileInfo
197
198
199
200
201
202
203





204
205
206



207
208
209



210
211
212
213

214
215
216
217
218
219
220
197
198
199
200
201
202
203
204
205
206
207
208



209
210
211
212


213
214
215
216
217
218

219
220
221
222
223
224
225
226







+
+
+
+
+
-
-
-
+
+
+

-
-
+
+
+



-
+








	foreach subDirectory $subDirectories {
		lappend outputFiles {*}[processDirectory $fsName $directory $subDirectory]
	}
	
	set inputFile $directory
	set outputFile $outputDirectory
	if {[info command ::xvfs::callback::setOutputFileName] ne ""} {
		set outputFile [::xvfs::callback::setOutputFileName $directory $directory $inputFile $outputDirectory $outputFile]
	}

	if {$outputFile ne "/"} {
	unset -nocomplain fileInfo
	file stat $inputFile fileInfo
	set fileInfo(children) $children
		unset -nocomplain fileInfo
		file stat $inputFile fileInfo
		set fileInfo(children) $children

	processFile $fsName $inputFile $outputFile [array get fileInfo]
	lappend outputFiles $outputFile
		processFile $fsName $inputFile $outputFile [array get fileInfo]
		lappend outputFiles $outputFile
	}

	if {$isTopLevel} {
		if {[info command ::xvfs::callback::addOutputFiles] ne ""} {
			lappend outputFiles {*}[::xvfs::callback::addOutputFiles]
			lappend outputFiles {*}[::xvfs::callback::addOutputFiles $fsName]
		}

		::xvfs::_emitLine "\};"
	}

	return $outputFiles
}
265
266
267
268
269
270
271
272

273
274
275

276
277
278
279
280
281
282
271
272
273
274
275
276
277

278
279
280

281
282
283
284
285
286
287
288







-
+


-
+







	## 3. Start processing directory and producing initial output
	set ::xvfs::outputFiles [processDirectory $fsName $rootDirectory]

	set ::xvfs::fsName $fsName
	set ::xvfs::rootDirectory $rootDirectory
}

proc ::xvfs::run {argv} {
proc ::xvfs::run {args} {
	uplevel #0 { package require minirivet }

	set ::xvfs::argv $argv
	set ::xvfs::argv $args
	::minirivet::parse [file join $::xvfs::_xvfsDir xvfs.c.rvt]
}

proc ::xvfs::setOutputChannel {channel} {
	uplevel #0 { package require minirivet }
	tailcall ::minirivet::setOutputChannel $channel
}