diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-11-30 03:11:52 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-11-30 03:11:52 -0800 |
| commit | a9c6be5fc3fffad6403ce63aa3951121491eb1d1 (patch) | |
| tree | 24b02104e79d4b90aa288ee7f42bbb784c047c5b /weed/filer | |
| parent | 141ce67c097565d085cf1ffaefd6aeb9e9e7db77 (diff) | |
| download | seaweedfs-a9c6be5fc3fffad6403ce63aa3951121491eb1d1.tar.xz seaweedfs-a9c6be5fc3fffad6403ce63aa3951121491eb1d1.zip | |
set creation time
Diffstat (limited to 'weed/filer')
| -rw-r--r-- | weed/filer/filer.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go index 2dec1afbf..8319212f1 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -238,6 +238,7 @@ func (f *Filer) CreateEntry(ctx context.Context, entry *Entry, o_excl bool, isFr func (f *Filer) UpdateEntry(ctx context.Context, oldEntry, entry *Entry) (err error) { if oldEntry != nil { + entry.Attr.Crtime = oldEntry.Attr.Crtime if oldEntry.IsDirectory() && !entry.IsDirectory() { glog.Errorf("existing %s is a directory", entry.FullPath) return fmt.Errorf("existing %s is a directory", entry.FullPath) |
