allow writes to preferences directory

svn: r7292
This commit is contained in:
Robby Findler 2007-09-07 15:55:46 +00:00
parent 8019362548
commit bd85d12125

View File

@ -50,12 +50,14 @@
(current-security-guard
(make-security-guard (current-security-guard)
(lambda (who what mode)
(when (memq 'write mode)
(unless (sub-path? (normal-path what)
(normal-path (find-system-path 'temp-dir)))
(error 'slideshow
"slide program attempted to write to filesystem: ~e"
what)))
(when (memq 'write mode)
(unless (or (sub-path? (normal-path what)
(normal-path (find-system-path 'temp-dir)))
(sub-path? (normal-path what)
(normal-path (find-system-path 'pref-dir))))
(error 'slideshow
"slide program attempted to write to filesystem: ~e"
what)))
(when (memq 'execute mode)
(error 'slideshow
"slide program attempted to execute external code: ~e"