Skip to content

Commit d98d315

Browse files
committed
cmd/sync: add the jfs specific prefix to distinguish business files from internal files
1 parent 32bbf3d commit d98d315

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/object.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (j *juiceFS) Put(rCtx context.Context, key string, in io.Reader, getters ..
139139
if len(name) > 200 {
140140
name = name[:200]
141141
}
142-
tmp = path.Join(path.Dir(p), fmt.Sprintf(".%s.tmp.%d", name, rand.Int()))
142+
tmp = path.Join(path.Dir(p), fmt.Sprintf(".jfs.%s.tmp.%d", name, rand.Int()))
143143
defer func() {
144144
if err != nil {
145145
if e := j.jfs.Delete(ctx, tmp); e != 0 {

pkg/object/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func (d *filestore) Put(ctx context.Context, key string, in io.Reader, getters .
160160
if len(name) > 200 {
161161
name = name[:200]
162162
}
163-
tmp = filepath.Join(filepath.Dir(p), "."+name+".tmp"+strconv.Itoa(rand.Int()))
163+
tmp = filepath.Join(filepath.Dir(p), ".jfs."+name+".tmp"+strconv.Itoa(rand.Int()))
164164
defer func() {
165165
if err != nil {
166166
_ = os.Remove(tmp)

0 commit comments

Comments
 (0)