Skip to content

Commit 32efa45

Browse files
vantuan88291isomorphic-git-bot
authored andcommitted
fix: The file “index” couldn’t be opened because there is no such file on iOS device (#1997)
* chore: add error code when using ios * chore: formating the code * chore: refactor syntax
1 parent bc787c7 commit 32efa45

File tree

7 files changed

+19
-11
lines changed

7 files changed

+19
-11
lines changed

blog/atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<link rel="alternate" href="https://isomorphic-git.org/blog"/>
88
<subtitle>The best place to stay up-to-date with the latest isomorphic-git news and events.</subtitle>
99
<logo>https://isomorphic-git.org/img/isomorphic-git-logo.svg</logo>
10-
<rights>Copyright © 2024 Isomorphic-git Contributors</rights>
10+
<rights>Copyright © 2025 Isomorphic-git Contributors</rights>
1111
<entry>
1212
<title type="html"><![CDATA[What is New in Version 1.0]]></title>
1313
<id>https://isomorphic-git.org/blog/2020/02/25/version-1-0-0.html</id>

blog/feed.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<url>https://isomorphic-git.org/img/isomorphic-git-logo.svg</url>
1313
<link>https://isomorphic-git.org/blog</link>
1414
</image>
15-
<copyright>Copyright © 2024 Isomorphic-git Contributors</copyright>
15+
<copyright>Copyright © 2025 Isomorphic-git Contributors</copyright>
1616
<item>
1717
<title><![CDATA[What is New in Version 1.0]]></title>
1818
<link>https://isomorphic-git.org/blog/2020/02/25/version-1-0-0.html</link>

js/isomorphic-git/index.cjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4567,7 +4567,11 @@ class FileSystem {
45674567
await this._stat(filepath);
45684568
return true
45694569
} catch (err) {
4570-
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {
4570+
if (
4571+
err.code === 'ENOENT' ||
4572+
err.code === 'ENOTDIR' ||
4573+
(err.code || '').includes('ENS')
4574+
) {
45714575
return false
45724576
} else {
45734577
console.log('Unhandled error in "FileSystem.exists()" function', err);
@@ -4720,7 +4724,7 @@ class FileSystem {
47204724
const stats = await this._lstat(filename);
47214725
return stats
47224726
} catch (err) {
4723-
if (err.code === 'ENOENT') {
4727+
if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {
47244728
return null
47254729
}
47264730
throw err
@@ -4738,7 +4742,7 @@ class FileSystem {
47384742
const link = await this._readlink(filename, opts);
47394743
return Buffer.isBuffer(link) ? link : Buffer.from(link)
47404744
} catch (err) {
4741-
if (err.code === 'ENOENT') {
4745+
if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {
47424746
return null
47434747
}
47444748
throw err

js/isomorphic-git/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4561,7 +4561,11 @@ class FileSystem {
45614561
await this._stat(filepath);
45624562
return true
45634563
} catch (err) {
4564-
if (err.code === 'ENOENT' || err.code === 'ENOTDIR') {
4564+
if (
4565+
err.code === 'ENOENT' ||
4566+
err.code === 'ENOTDIR' ||
4567+
(err.code || '').includes('ENS')
4568+
) {
45654569
return false
45664570
} else {
45674571
console.log('Unhandled error in "FileSystem.exists()" function', err);
@@ -4714,7 +4718,7 @@ class FileSystem {
47144718
const stats = await this._lstat(filename);
47154719
return stats
47164720
} catch (err) {
4717-
if (err.code === 'ENOENT') {
4721+
if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {
47184722
return null
47194723
}
47204724
throw err
@@ -4732,7 +4736,7 @@ class FileSystem {
47324736
const link = await this._readlink(filename, opts);
47334737
return Buffer.isBuffer(link) ? link : Buffer.from(link)
47344738
} catch (err) {
4735-
if (err.code === 'ENOENT') {
4739+
if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {
47364740
return null
47374741
}
47384742
throw err

js/isomorphic-git/index.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/isomorphic-git/index.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/isomorphic-git/size_report.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)