Fix calculation of padding in windows binstubs (#4188)

diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
index 5392b08..067803f 100644
--- a/lib/src/global_packages.dart
+++ b/lib/src/global_packages.dart
@@ -784,6 +784,9 @@
     }
 
     late String binstub;
+    // We need an absolute path since relative ones won't be relative to the
+    // right directory when the user runs this.
+    snapshot = p.absolute(snapshot);
     // Batch files behave in funky ways if they are modified while updating.
     // To ensure that the byte-offsets of everything stays the same even if the
     // snapshot filename changes we insert some padding in lines containing the
@@ -791,9 +794,6 @@
     // 260 is the maximal short path length on Windows. Hopefully that is
     // enough.
     final padding = ' ' * (260 - snapshot.length);
-    // We need an absolute path since relative ones won't be relative to the
-    // right directory when the user runs this.
-    snapshot = p.absolute(snapshot);
     if (Platform.isWindows) {
       binstub = '''
 @echo off