vbs가 삭제후 아무것도 없을시 폴더 삭제

This commit is contained in:
toki 2023-01-26 11:40:20 +09:00
parent b3f616f0d2
commit 00c82099d9

View file

@ -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