[Bps-public-commit] Prophet branch, master, updated. bf2f49d39472c06dd4fc679b35ae216a301fbb07

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Aug 20 02:32:21 EDT 2009


The branch, master has been updated
       via  bf2f49d39472c06dd4fc679b35ae216a301fbb07 (commit)
      from  21505b9c2b87efd4d0964fd860d1d20c33a672bf (commit)

Summary of changes:
 Makefile.PL                       |    3 +++
 lib/Prophet/CLI/PublishCommand.pm |    7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit bf2f49d39472c06dd4fc679b35ae216a301fbb07
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Aug 20 12:57:39 2009 +0800

    Win32::GetLongPathName rocks!

diff --git a/Makefile.PL b/Makefile.PL
index ec97f27..a004b6c 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -22,6 +22,9 @@ requires( 'Path::Dispatcher' => '0.09' );    # Path::Dispatcher::Declarative
 requires('Time::Progress');
 requires('Config::GitLike' => '1.02');
 requires('MIME::Base64::URLSafe');
+if ( $^O =~ /MSWin/ ) {
+    requires( 'Win32' );
+}
 
 build_requires( 'Test::Exception' => '0.26' );
 
diff --git a/lib/Prophet/CLI/PublishCommand.pm b/lib/Prophet/CLI/PublishCommand.pm
index 36e9c65..47534ca 100644
--- a/lib/Prophet/CLI/PublishCommand.pm
+++ b/lib/Prophet/CLI/PublishCommand.pm
@@ -27,12 +27,13 @@ sub publish_dir {
     push @args, '--ignore-times';
     
     if ( $^O =~ /MSWin/ ) {
+        require Win32;
         for (qw/from to/) {
+            # convert old 8.3 name
+            $args{$_} = Win32::GetLongPathName($args{$_});
+            # cwrsync uses cygwin
             $args{$_} =~ s!^([A-Z]):!'/cygdrive/' . lc $1!eg;
             $args{$_} =~ s!\\!/!g;
-            $args{$_} =~ s!/DOCUME~1!/Documents And Settings!g;
-            $args{$_} =~ s!/ADMINI~1!/Administrator!g;
-            $args{$_} =~ s!/LOCALS~1!/Local Settings!g;
             $args{$_} = q{"} . $args{$_} . q{"};
         }
     }

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list