Skip to content

Commit d7ad00b

Browse files
committed
Update regex pattern
1 parent 2959292 commit d7ad00b

29 files changed

+34
-34
lines changed

Dropbox.Api/Dropbox.Api.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>$id$</id>
5-
<version>2.1.0</version>
5+
<version>2.1.1</version>
66
<title>Dropbox v2 API Beta</title>
77
<authors>Dropbox Inc</authors>
88
<owners>Dropbox Inc</owners>
@@ -12,7 +12,7 @@
1212
<iconUrl>https://cf.dropboxstatic.com/static/images/icons/blue_dropbox_glyph.png</iconUrl>
1313
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1414
<description>Portable class library for accessing the Dropbox v2 API</description>
15-
<releaseNotes>Preview Release. Update shared folder APIs.</releaseNotes>
15+
<releaseNotes>Preview Release. Minor bug fixes.</releaseNotes>
1616
<copyright>Copyright (c) Dropbox Inc. 2015</copyright>
1717
<tags>Dropbox Api</tags>
1818
</metadata>

Dropbox.Api/Files/CommitInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public CommitInfo(string path,
5555
{
5656
throw new sys.ArgumentNullException("path");
5757
}
58-
else if (!re.Regex.IsMatch(path, @"\A/.*\z"))
58+
else if (!re.Regex.IsMatch(path, @"\A(?:/.*)\z"))
5959
{
6060
throw new sys.ArgumentOutOfRangeException("path");
6161
}

Dropbox.Api/Files/CreateFolderArg.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public CreateFolderArg(string path)
3838
{
3939
throw new sys.ArgumentNullException("path");
4040
}
41-
else if (!re.Regex.IsMatch(path, @"\A/.*\z"))
41+
else if (!re.Regex.IsMatch(path, @"\A(?:/.*)\z"))
4242
{
4343
throw new sys.ArgumentOutOfRangeException("path");
4444
}

Dropbox.Api/Files/DeleteArg.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public DeleteArg(string path)
3737
{
3838
throw new sys.ArgumentNullException("path");
3939
}
40-
else if (!re.Regex.IsMatch(path, @"\A/.*\z"))
40+
else if (!re.Regex.IsMatch(path, @"\A(?:/.*)\z"))
4141
{
4242
throw new sys.ArgumentOutOfRangeException("path");
4343
}

Dropbox.Api/Files/DownloadArg.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public DownloadArg(string path,
4040
{
4141
throw new sys.ArgumentNullException("path");
4242
}
43-
else if (!re.Regex.IsMatch(path, @"\A((/|id:).*)|(rev:[0-9a-f]{9,})\z"))
43+
else if (!re.Regex.IsMatch(path, @"\A(?:((/|id:).*)|(rev:[0-9a-f]{9,}))\z"))
4444
{
4545
throw new sys.ArgumentOutOfRangeException("path");
4646
}
4747

48-
if (rev != null && (rev.Length < 9 || !re.Regex.IsMatch(rev, @"\A[0-9a-f]+\z")))
48+
if (rev != null && (rev.Length < 9 || !re.Regex.IsMatch(rev, @"\A(?:[0-9a-f]+)\z")))
4949
{
5050
throw new sys.ArgumentOutOfRangeException("rev");
5151
}

Dropbox.Api/Files/FileMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public FileMetadata(string name,
6666
{
6767
throw new sys.ArgumentNullException("rev");
6868
}
69-
else if (rev.Length < 9 || !re.Regex.IsMatch(rev, @"\A[0-9a-f]+\z"))
69+
else if (rev.Length < 9 || !re.Regex.IsMatch(rev, @"\A(?:[0-9a-f]+)\z"))
7070
{
7171
throw new sys.ArgumentOutOfRangeException("rev");
7272
}

Dropbox.Api/Files/FolderMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public FolderMetadata(string name,
5252
throw new sys.ArgumentOutOfRangeException("id");
5353
}
5454

55-
if (sharedFolderId != null && (!re.Regex.IsMatch(sharedFolderId, @"\A[-_0-9a-zA-Z:]+\z")))
55+
if (sharedFolderId != null && (!re.Regex.IsMatch(sharedFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z")))
5656
{
5757
throw new sys.ArgumentOutOfRangeException("sharedFolderId");
5858
}

Dropbox.Api/Files/GetMetadataArg.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public GetMetadataArg(string path,
4040
{
4141
throw new sys.ArgumentNullException("path");
4242
}
43-
else if (!re.Regex.IsMatch(path, @"\A((/|id:).*)|(rev:[0-9a-f]{9,})\z"))
43+
else if (!re.Regex.IsMatch(path, @"\A(?:((/|id:).*)|(rev:[0-9a-f]{9,}))\z"))
4444
{
4545
throw new sys.ArgumentOutOfRangeException("path");
4646
}

Dropbox.Api/Files/ListFolderArg.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public ListFolderArg(string path,
4747
{
4848
throw new sys.ArgumentNullException("path");
4949
}
50-
else if (!re.Regex.IsMatch(path, @"\A(/.*)?\z"))
50+
else if (!re.Regex.IsMatch(path, @"\A(?:(/.*)?)\z"))
5151
{
5252
throw new sys.ArgumentOutOfRangeException("path");
5353
}

Dropbox.Api/Files/ListRevisionsArg.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public ListRevisionsArg(string path,
4040
{
4141
throw new sys.ArgumentNullException("path");
4242
}
43-
else if (!re.Regex.IsMatch(path, @"\A/.*\z"))
43+
else if (!re.Regex.IsMatch(path, @"\A(?:/.*)\z"))
4444
{
4545
throw new sys.ArgumentOutOfRangeException("path");
4646
}

0 commit comments

Comments
 (0)