canton7 / SyncTrayzor

Windows tray utility / filesystem watcher / launcher for Syncthing
MIT License
5.98k stars 412 forks source link

System.UnauthorizedAccessException #778

Open Salamimonster opened 1 year ago

Salamimonster commented 1 year ago

SyncTrayzor.exe 1.1.29.0 Syncthing.exe 1.18.1.0 Windows 7 pro (yes, end of support by Microsoft, I know, I know)

Hey there :-) I just downloaded the app and extracted the portable version to my "portable programs folder". Then I started SyncTrayzor.exe and the console showed up. But - it was like a new "instance" of syncthing - not showing my devices and folder, settings etc.. So I searched for a setting, to tell SyncTrayzor.exe the path to my current Syncthing installation (portable). In Settings | Syncthing | Extended (or similar) there were two fields to enter Syncthing pathes (can´t remember the names). I added the path to my Syncthing installation to the field at the bottom, restarted SyncTrayzor.exe and it showed the empty, new instance again. I added the path to my Syncthing installation to the field above the bottom filed, restarted SyncTrayzor.exe and it showed this error message:

Version: 1.1.29.0; Variant: Portable; Arch: Amd64
Path: C:\PApps\Public-special\syncthingTrayzor\SyncTrayzor.exe
System.UnauthorizedAccessException: Zugriff verweigert

   at Pri.LongPath.File.Copy(String sourcePath, String destinationPath, Boolean overwrite)
   at SyncTrayzor.Services.FilesystemProvider.Copy(String from, String to) in C:\projects\synctrayzor\src\SyncTrayzor\Services\FilesystemProvider.cs:line 51
   at SyncTrayzor.Services.Config.ConfigurationProvider.Initialize(Configuration defaultConfiguration) in C:\projects\synctrayzor\src\SyncTrayzor\Services\Config\ConfigurationProvider.cs:line 137
   at SyncTrayzor.Bootstrapper.Configure() in C:\projects\synctrayzor\src\SyncTrayzor\Bootstrapper.cs:line 168
   at Stylet.BootstrapperBase.Start(String[] args)
   at System.Windows.Application.OnStartup(StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I can edit any file within the "C:\PApps\Public-special\syncthingTrayzor\" folder. There was no "C:\projects\" folder existing, so I created one by myself, but that did not help.

Salamimonster commented 1 year ago

OK, I found the "handy table" and saw, that the content of the "C:\Users\\AppData\Local\Syncthing" folder must be copied to the "data\syncthing" folder. After deleting everything and starting from scratch, it works now. Nice.

Maybe it is a good idea to include a reference to the "handy table" in the Installation section on the github site.

Can be closed.