File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -277,16 +277,22 @@ private void TakeLinuxScreenshot(string saveDirectory)
277277 {
278278 if ( IsFlameshotSetup ( ) )
279279 {
280- string savePath = Path . Combine ( saveDirectory , _config . LatestScreenshotName ) ;
280+ string savePath = Path . Combine ( saveDirectory , _config . LatestScreenshotName . Normalize ( ) ) ;
281281
282282 if ( File . Exists ( savePath ) )
283283 {
284+ _loggingService . LogInfo ( "Old Screenshot exists - attempting delete" ) ;
284285 File . Delete ( savePath ) ;
286+ _loggingService . LogInfo ( $ "Old Screenshot deleted: { ! File . Exists ( savePath ) } ") ;
287+ }
288+ else
289+ {
290+ _loggingService . LogInfo ( "Old Screenshot does not exist." ) ;
285291 }
286292
287293 string arguments = _isInFlatpak
288- ? $ "{ _flameshotArgs } screen -r -p \" { savePath } \" "
289- : $ "screen -r -p \" { savePath } \" ";
294+ ? $ "{ _flameshotArgs } screen -r -p \" { savePath } \" "
295+ : $ "screen -r -p \" { savePath } \" ";
290296
291297 ProcessStartInfo flameshotStartInfo = new ( )
292298 {
@@ -295,7 +301,8 @@ private void TakeLinuxScreenshot(string saveDirectory)
295301 } ;
296302
297303 Process process = Process . Start ( flameshotStartInfo ) ;
298- process . WaitForExit ( 2000 ) ;
304+ process . WaitForExit ( 5000 ) ;
305+ process . Close ( ) ;
299306
300307 if ( ! File . Exists ( savePath ) )
301308 {
You can’t perform that action at this time.
0 commit comments