Skip to content

Commit 65c1c7a

Browse files
committed
fix: Clipboard-Exception on Linux
1 parent 10bcd5d commit 65c1c7a

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

Quickshare/Program.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,16 @@
104104
var url = access.CreateShareURL(quickshareConfig.BucketName, o.Filename, true, true).Replace("gateway", "link");
105105
Console.WriteLine("Your URL is:");
106106
Console.WriteLine(url);
107-
TextCopy.ClipboardService.SetText(url);
108-
Console.WriteLine("It has been copied to the clipboard.");
107+
try
108+
{
109+
TextCopy.ClipboardService.SetText(url);
110+
Console.WriteLine("It has been copied to the clipboard.");
111+
}
112+
catch
113+
{
114+
//Might fail on e.g. Linux
115+
}
116+
109117
if (shareDuration != TimeSpan.MinValue)
110118
{
111119
Console.ForegroundColor = ConsoleColor.Magenta;

Quickshare/Quickshare.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<PackAsTool>true</PackAsTool>
@@ -12,11 +12,11 @@
1212
<Title>Quickshare</Title>
1313
<Authors>TopperDEL</Authors>
1414
<Company>TopperDEL</Company>
15-
<Version>1.0.5</Version>
16-
<PackageReleaseNotes>Release v1.0.1!
17-
Supports Windows, Linux and MacOS</PackageReleaseNotes>
15+
<Version>1.0.6</Version>
16+
<PackageReleaseNotes>Release v1.0.6
17+
Fixes bug on linux regarding Clipboard-sharing</PackageReleaseNotes>
1818
<Description>This package lets you share files quickly by leveraging Storj DCS.</Description>
19-
<Copyright>2022 TopperDEL</Copyright>
19+
<Copyright>2023 TopperDEL</Copyright>
2020
<PackageProjectUrl>https://github.com/TopperDEL/Quickshare</PackageProjectUrl>
2121
<PackageIcon>StoreLogo.png</PackageIcon>
2222
<RepositoryUrl>https://github.com/TopperDEL/Quickshare</RepositoryUrl>

0 commit comments

Comments
 (0)