vbs가 삭제후 아무것도 없을시 폴더 삭제
This commit is contained in:
parent
b3f616f0d2
commit
00c82099d9
1 changed files with 9 additions and 2 deletions
|
|
@ -345,8 +345,15 @@ Set WshShell = Nothing
|
|||
|
||||
//delete vbs file
|
||||
var vbsInstallDir = Directory('$userPath$windowRoamingPath$label');
|
||||
if (await vbsInstallDir.exists()) {
|
||||
await vbsInstallDir.delete(recursive: true);
|
||||
var vbsFile = File(path.join(vbsInstallDir.path, '$label.vbs'));
|
||||
if (await vbsFile.exists()) {
|
||||
await vbsFile.delete();
|
||||
var list = vbsInstallDir.listSync(recursive: true);
|
||||
if (list.isEmpty) {
|
||||
if (await vbsInstallDir.exists()) {
|
||||
await vbsInstallDir.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//delete shorcut file
|
||||
|
|
|
|||
Loading…
Reference in a new issue