1 parent
fdb320d30c
commit
0ac1491bfb
3 files changed
+5
-5
No files matched your search
@@ -2,10 +2,10 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/djherbis/times"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"github.com/djherbis/times"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func copySize(srcs []string) (int64, error) {
|
func copySize(srcs []string) (int64, error) {
|
||||||
@@ -84,8 +84,8 @@ func copyFile(src, dst string, info os.FileInfo, nums chan int64) error {
|
|||||||
|
|
||||||
if preserve_timestamps {
|
if preserve_timestamps {
|
||||||
ts := times.Get(info)
|
ts := times.Get(info)
|
||||||
mtime := info.ModTime();
|
mtime := info.ModTime()
|
||||||
atime := ts.AccessTime();
|
atime := ts.AccessTime()
|
||||||
if err := os.Chtimes(dst, atime, mtime); err != nil {
|
if err := os.Chtimes(dst, atime, mtime); err != nil {
|
||||||
os.Remove(dst)
|
os.Remove(dst)
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ func (e *setExpr) eval(app *app, args []string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
toks := strings.Split(e.val, ":")
|
toks := strings.Split(e.val, ":")
|
||||||
for _,s := range toks {
|
for _, s := range toks {
|
||||||
switch s {
|
switch s {
|
||||||
case "mode", "timestamps":
|
case "mode", "timestamps":
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ func init() {
|
|||||||
gOpts.history = true
|
gOpts.history = true
|
||||||
gOpts.info = nil
|
gOpts.info = nil
|
||||||
gOpts.ruler = []string{"acc", "progress", "selection", "filter", "ind"}
|
gOpts.ruler = []string{"acc", "progress", "selection", "filter", "ind"}
|
||||||
gOpts.preserve= []string{"mode"}
|
gOpts.preserve = []string{"mode"}
|
||||||
gOpts.shellopts = nil
|
gOpts.shellopts = nil
|
||||||
gOpts.sortType = sortType{naturalSort, dirfirstSort}
|
gOpts.sortType = sortType{naturalSort, dirfirstSort}
|
||||||
gOpts.tempmarks = "'"
|
gOpts.tempmarks = "'"
|
||||||
|
|||||||
Reference in new issue
Block a user