Commits

Kaspar Schiess committed 48aa2ec

. -t all to get the snapshots

  • Participants
  • Parent commits bfc9b8f

Comments (0)

Files changed (1)

lib/zfs/dataset.rb

 
+require 'shellwords'
+
 # A zfs dataset such as 'pool1/backup'
 #
 class ZFS::Dataset
   # Raw command 'zfs', args are passed as command line arguments. 
   # 
   def zfs(*args)
-    `sudo /sbin/zfs #{args.join(' ')}`
+    arguments = args.map { |e| Shellwords.escape(e) }.join(' ')
+    `sudo /sbin/zfs #{arguments}`
   end
   
   def list(dataset)
-    zfs 'list', %w(-rH -oname), dataset
+    zfs 'list', %w(-t all -rH -oname), dataset
   end
 end