mirror of https://github.com/xwiki-labs/cryptpad
Check if a blob exists before creating the activity file
This commit is contained in:
parent
31b9bbf796
commit
0e918643ce
|
@ -153,8 +153,12 @@ var clearActivity = function (Env, blobId, cb) {
|
|||
};
|
||||
var updateActivity = function (Env, blobId, cb) {
|
||||
var path = makeActivityPath(Env, blobId);
|
||||
var s_data = String(+new Date());
|
||||
Fs.writeFile(path, s_data, cb);
|
||||
var blobPath = makeBlobPath(Env, blobId);
|
||||
isFile(blobPath, (err, state) => {
|
||||
if (err || !state) { return void cb(); }
|
||||
var s_data = String(+new Date());
|
||||
Fs.writeFile(path, s_data, cb);
|
||||
});
|
||||
};
|
||||
|
||||
var archiveActivity = function (Env, blobId, cb) {
|
||||
|
|
Loading…
Reference in New Issue