mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 15:41:19 +00:00
删除用户优化
This commit is contained in:
17
node_modules/user.js
generated
vendored
17
node_modules/user.js
generated
vendored
@@ -251,11 +251,14 @@ User = {
|
||||
return 'data/' + this.getCurActiveUserId() + '/attachs';
|
||||
},
|
||||
|
||||
getUserImagesAndAttachBasePath: function(userId) {
|
||||
return Evt.getBasePath() + '/data/' + userId;
|
||||
},
|
||||
getUserImagesPath: function(userId) {
|
||||
return Evt.getBasePath() + '/data/' + userId + '/images';
|
||||
return this.getUserImagesAndAttachBasePath() + '/images';
|
||||
},
|
||||
getUserAttachsPath: function(userId) {
|
||||
return Evt.getBasePath() + '/data/' + userId + '/attachs';
|
||||
return this.getUserImagesAndAttachBasePath() + '/attachs';
|
||||
},
|
||||
|
||||
getUserDBPath: function (userId) {
|
||||
@@ -275,13 +278,9 @@ User = {
|
||||
return;
|
||||
}
|
||||
|
||||
var imagesPath = me.getUserImagesPath(userId);
|
||||
var attachsPath = me.getUserAttachsPath(userId);
|
||||
if (imagesPath) {
|
||||
Common.deleteFolderRecursive(imagesPath);
|
||||
}
|
||||
if (attachsPath) {
|
||||
Common.deleteFolderRecursive(attachsPath);
|
||||
var imagesAndAttachBasePath = me.getUserImagesAndAttachBasePath(userId);
|
||||
if (imagesAndAttachBasePath) {
|
||||
Common.deleteFolderRecursive(imagesAndAttachBasePath);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user