Skip to content

Instantly share code, notes, and snippets.

@joodie
Created October 12, 2012 12:04
Show Gist options
  • Save joodie/3878893 to your computer and use it in GitHub Desktop.
Save joodie/3878893 to your computer and use it in GitHub Desktop.
Emacs fix delete entries with backslash in zip
;; make it possible to delete zip entries that have a backslash in
;; their name.
(defun archive-zip-fix-backslash-name
(name)
(replace-regexp-in-string "\\\\" "\\\\\\\\" name))
(defun archive-zip-expunge
(archive files)
(apply 'call-process
"zip"
nil
nil
nil
(cons "-dq" (cons archive (mapcar 'archive-zip-fix-backslash-name files)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment