@@ -252,7 +252,7 @@ pub fn sockets_dir() -> Result<PathBuf> {
252252 if #[ cfg( unix) ] {
253253 Ok ( runtime_dir( ) ?. join( RUNTIME_DIR_NAME ) )
254254 } else if #[ cfg( windows) ] {
255- Ok ( runtime_dir( ) ?. join( "sockets" ) )
255+ Ok ( runtime_dir( ) ?. join( "AmazonQ" ) . join ( " sockets") )
256256 }
257257 }
258258}
@@ -431,15 +431,6 @@ pub fn resources_path_ctx<Ctx: EnvProvider + PlatformProvider>(ctx: &Ctx) -> Res
431431 }
432432}
433433
434- /// The path to the managed binaries directory
435- ///
436- /// - Linux: "/usr/share/fig"
437- /// - MacOS: "/Applications/Amazon Q.app/Contents/Resources"
438- /// - Windows: "%LOCALAPPDATA%\AmazonQ\resources\bin"
439- pub fn managed_binaries_dir ( ) -> Result < PathBuf > {
440- Ok ( resources_path ( ) ?. join ( "bin" ) )
441- }
442-
443434/// The path to the fig install manifest
444435///
445436/// - MacOS: "/Applications/Amazon Q.app/Contents/Resources/manifest.json"
@@ -450,7 +441,7 @@ pub fn manifest_path() -> Result<PathBuf> {
450441 if #[ cfg( unix) ] {
451442 Ok ( resources_path( ) ?. join( "manifest.json" ) )
452443 } else if #[ cfg( target_os = "windows" ) ] {
453- Ok ( managed_binaries_dir ( ) ?. join( "manifest.json" ) )
444+ Ok ( resources_path ( ) ?. join ( "bin" ) . join( "manifest.json" ) )
454445 }
455446 }
456447}
@@ -562,7 +553,6 @@ utf8_dir!(sockets_dir);
562553utf8_dir ! ( remote_socket_path) ;
563554utf8_dir ! ( figterm_socket_path, session_id: impl Display ) ;
564555utf8_dir ! ( manifest_path) ;
565- utf8_dir ! ( managed_binaries_dir) ;
566556utf8_dir ! ( backups_dir) ;
567557utf8_dir ! ( logs_dir) ;
568558utf8_dir ! ( settings_path) ;
@@ -583,7 +573,6 @@ mod linux_tests {
583573 assert ! ( local_remote_socket_path( ) . is_ok( ) ) ;
584574 assert ! ( figterm_socket_path( "test" ) . is_ok( ) ) ;
585575 assert ! ( resources_path( ) . is_ok( ) ) ;
586- assert ! ( managed_binaries_dir( ) . is_ok( ) ) ;
587576 assert ! ( manifest_path( ) . is_ok( ) ) ;
588577 assert ! ( backups_dir( ) . is_ok( ) ) ;
589578 assert ! ( logs_dir( ) . is_ok( ) ) ;
@@ -627,7 +616,7 @@ mod tests {
627616 #[ cfg( windows) ]
628617 assert_eq ! (
629618 figterm_socket_path( "" ) . unwrap( ) . parent( ) . unwrap( ) . file_name( ) . unwrap( ) ,
630- "figterm "
619+ "t "
631620 ) ;
632621 }
633622
@@ -719,7 +708,7 @@ mod tests {
719708 fn snapshot_sockets_dir ( ) {
720709 linux ! ( sockets_dir( ) , @"$XDG_RUNTIME_DIR/cwrun" ) ;
721710 macos ! ( sockets_dir( ) , @"$TMPDIR/cwrun" ) ;
722- windows ! ( sockets_dir( ) , @r"C:\Users\$USER\AppData\Local\Temp\sockets" ) ;
711+ windows ! ( sockets_dir( ) , @r"C:\Users\$USER\AppData\Local\Temp\AmazonQ\ sockets" ) ;
723712 }
724713
725714 #[ test]
@@ -740,35 +729,28 @@ mod tests {
740729 fn snapshot_fig_socket_path ( ) {
741730 linux ! ( desktop_socket_path( ) , @"$XDG_RUNTIME_DIR/cwrun/desktop.sock" ) ;
742731 macos ! ( desktop_socket_path( ) , @"$TMPDIR/cwrun/desktop.sock" ) ;
743- windows ! ( desktop_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\sockets\desktop.sock" ) ;
732+ windows ! ( desktop_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\AmazonQ\ sockets\desktop.sock" ) ;
744733 }
745734
746735 #[ test]
747736 fn snapshot_remote_socket_path ( ) {
748737 linux ! ( remote_socket_path( ) , @"$XDG_RUNTIME_DIR/cwrun/remote.sock" ) ;
749738 macos ! ( remote_socket_path( ) , @"$TMPDIR/cwrun/remote.sock" ) ;
750- windows ! ( remote_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\sockets\remote.sock" ) ;
739+ windows ! ( remote_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\AmazonQ\ sockets\remote.sock" ) ;
751740 }
752741
753742 #[ test]
754743 fn snapshot_local_remote_socket_path ( ) {
755744 linux ! ( local_remote_socket_path( ) , @"$XDG_RUNTIME_DIR/cwrun/remote.sock" ) ;
756745 macos ! ( local_remote_socket_path( ) , @"$TMPDIR/cwrun/remote.sock" ) ;
757- windows ! ( local_remote_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\sockets\remote.sock" ) ;
746+ windows ! ( local_remote_socket_path( ) , @r"C:\Users\$USER\AppData\Local\Temp\AmazonQ\ sockets\remote.sock" ) ;
758747 }
759748
760749 #[ test]
761750 fn snapshot_figterm_socket_path ( ) {
762751 linux ! ( figterm_socket_path( "$SESSION_ID" ) , @"$XDG_RUNTIME_DIR/cwrun/t/$SESSION_ID.sock" ) ;
763752 macos ! ( figterm_socket_path( "$SESSION_ID" ) , @"$TMPDIR/cwrun/t/$SESSION_ID.sock" ) ;
764- windows ! ( figterm_socket_path( "$SESSION_ID" ) , @r"C:\Users\$USER\AppData\Local\Temp\sockets\t\$SESSION_ID.sock" ) ;
765- }
766-
767- #[ test]
768- fn snapshot_managed_binaries_dir ( ) {
769- linux ! ( managed_binaries_dir( ) , @"/usr/share/fig" ) ;
770- macos ! ( managed_binaries_dir( ) , @"/Applications/Amazon Q.app/Contents/Resources" ) ;
771- windows ! ( managed_binaries_dir( ) , @r"C:\Users\$USER\AppData\Local\AmazonQ\resources\bin" ) ;
753+ windows ! ( figterm_socket_path( "$SESSION_ID" ) , @r"C:\Users\$USER\AppData\Local\Temp\AmazonQ\sockets\t\$SESSION_ID.sock" ) ;
772754 }
773755
774756 #[ test]
0 commit comments