* fix issue#7476
diff --git a/Lib/pipes.py b/Lib/pipes.py
index 6dcc997..25e9915 100644
--- a/Lib/pipes.py
+++ b/Lib/pipes.py
@@ -267,10 +267,13 @@
 _funnychars = '"`$\\'                           # Unsafe inside "double quotes"
 
 def quote(file):
+    ''' return a shell-escaped version of the file string '''
     for c in file:
         if c not in _safechars:
             break
     else:
+        if not file:
+            return "''"
         return file
     if '\'' not in file:
         return '\'' + file + '\''