Subject: | [Patch] Handle mount points containing whitespace. |
Date: | Mon, 14 Mar 2011 18:41:34 -0500 |
To: | bug-Sys-Filesystem [...] rt.cpan.org |
From: | Elliot Shank <perl [...] galumph.com> |
I've got mount points containing whitespace. On Linux, this means that /proc/self/mounts ends up containing things like "/foo/bar\040baz". Attached is a patch that deals with C-style escapes in mount points. It uses a string-eval to deal with this; not the nicest thing in the world, but there doesn't seem to be any module that does it and Perl::Critic gets away with it. :]
The patch is in two forms: one complete one that does everything or three that do the change piecewise.
Partial patch 1 changes Sys::Filesystem::Unix to use a $mount_point variable everywhere instead of "$vals[ $pridx->[1] ]".
Partial patch 2 adds a cleanUpMountPoint() method to Sys::Filesystem::Unix and uses that to deal with the C-style escapes.
Partial patch 3 changes Sys::Filesystem::Linux to use cleanUpMountPoint().
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.