Advertisement
nik684

FixSystemAttribute

Oct 19th, 2024
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. (
  2. fn FixSystemAttribute dir =
  3. (
  4. if not doesDirectoryExist dir then return undefined
  5. if getFileAttribute dir #system then
  6. (
  7. try
  8. (
  9. setFileAttribute dir #system false
  10. format "system attribute disabled for: % \n" dir
  11. )catch
  12. (
  13. format "could not disable system attribute for: % \n" dir
  14. )
  15. )
  16. local parentdir = pathConfig.removePathLeaf dir
  17. if pathConfig.isRootPath parentdir then return undefined
  18. FixSystemAttribute parentdir
  19. )
  20. FixSystemAttribute (getdir #userscripts)
  21. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement