projects
/
tclvfs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70c5312
)
binary file support
author
Vince Darley
<vincentdarley@sourceforge.net>
Tue, 14 Aug 2001 15:50:24 +0000
(15:50 +0000)
committer
Vince Darley
<vincentdarley@sourceforge.net>
Tue, 14 Aug 2001 15:50:24 +0000
(15:50 +0000)
library/ftpvfs.tcl
patch
|
blob
|
history
diff --git
a/library/ftpvfs.tcl
b/library/ftpvfs.tcl
index d0ba11a1239a1e6c66575d0a41f9e09afb1310ef..5775ef25b0ed30128b83626599435c2a75f6a0b8 100644
(file)
--- a/
library/ftpvfs.tcl
+++ b/
library/ftpvfs.tcl
@@
-138,9
+138,17
@@
proc vfs::ftp::open {fd name mode permissions} {
proc vfs::ftp::_closing {fd name filed action} {
seek $filed 0
set contents [read $filed]
+ set trans [fconfigure $filed -translation]
+ if {$trans == "binary"} {
+ set oldType [::ftp::Type $fd]
+ ::ftp::Type $fd binary
+ }
if {![::ftp::$action $fd -data $contents $name]} {
error "Failed to write to $name"
}
+ if {[info exists oldType]} {
+ ::ftp::Type $fd $oldType
+ }
}
proc vfs::ftp::_findFtpInfo {fd name} {