- (if (file-exists-p expanded-filename)
- (let* ((local-copy (epg-file-invoke-default-handler
- 'file-local-copy
- (list expanded-filename)))
- (local-file (or local-copy expanded-filename))
- (coding-system-for-read 'binary)
- (context (epg-make-context))
- string)
+ (if (file-exists-p filename)
+ (let ((local-file
+ (let ((inhibit-file-name-operation
+ (when (eq inhibit-file-name-operation
+ 'insert-file-contents)
+ 'file-local-copy)))
+ (file-local-copy filename)))
+ (coding-system-for-read 'binary)
+ (context (epg-make-context))
+ string)