Skip to content

Commit 21d1be6

Browse files
committed
Fix typos
1 parent 9c77aef commit 21d1be6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apply.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func apply(update io.Reader, opts *Options) error {
107107
updateDir := filepath.Dir(opts.TargetPath)
108108
filename := filepath.Base(opts.TargetPath)
109109

110-
// Copy the contents of newbinary to a new executable file
110+
// Copy the contents of the new binary to a new executable file
111111
newPath := filepath.Join(updateDir, fmt.Sprintf(".%s.new", filename))
112112
fp, err := openFile(newPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, opts.TargetMode)
113113
if err != nil {
@@ -120,7 +120,7 @@ func apply(update io.Reader, opts *Options) error {
120120
if err != nil {
121121
return err
122122
}
123-
//don't call fp.Sync().system power off ,file will lost
123+
// if we don't call fp.Sync(), a system power off could lose the file
124124
fp.Sync()
125125
// if we don't call fp.Close(), windows won't let us move the new executable
126126
// because the file will still be "in use"
@@ -144,7 +144,7 @@ func apply(update io.Reader, opts *Options) error {
144144
return err
145145
}
146146

147-
// move the new exectuable in to become the new program
147+
// move the new executable in to become the new program
148148
err = os.Rename(newPath, opts.TargetPath)
149149

150150
if err != nil {

0 commit comments

Comments
 (0)