We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e29c4d commit 80ef677Copy full SHA for 80ef677
go-playground.el
@@ -134,8 +134,11 @@ func main() {
134
"Remove files of the current snippet together with directory of this snippet."
135
(interactive)
136
(save-buffer)
137
- (delete-directory (file-name-directory (buffer-file-name)) t t)
138
- (kill-buffer))
+ (if (string-match-p (file-truename go-playground-basedir) (file-truename (buffer-file-name)))
+ (progn (delete-directory (file-name-directory (buffer-file-name)) t t)
139
+ (kill-buffer))
140
+ (message "Won't delete this! Because %s is not under the path %s. Remove the snippet manually!"
141
+ (buffer-file-name) go-playground-basedir)))
142
143
;;;###autoload
144
(defun go-playground-remove-current-snippet ()
0 commit comments