File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,13 @@ export default class InstallState {
29
29
state . store = JSON . parse (
30
30
await fsOperation ( state . storeUrl ) . readFile ( "utf-8" ) ,
31
31
) ;
32
+
33
+ const patchedStore = { } ;
34
+ for ( const [ key , value ] of Object . entries ( state . store ) ) {
35
+ patchedStore [ key . toLowerCase ( ) ] = value ;
36
+ }
37
+
38
+ state . store = patchedStore ;
32
39
} else {
33
40
state . store = { } ;
34
41
await fsOperation ( INSTALL_STATE_STORAGE ) . createFile ( state . id ) ;
@@ -48,6 +55,7 @@ export default class InstallState {
48
55
* @returns
49
56
*/
50
57
async isUpdated ( url , content ) {
58
+ url = url . toLowerCase ( ) ;
51
59
const current = this . store [ url ] ;
52
60
const update =
53
61
typeof content === "string"
@@ -62,8 +70,13 @@ export default class InstallState {
62
70
}
63
71
}
64
72
73
+ /**
74
+ *
75
+ * @param {string } url
76
+ * @returns
77
+ */
65
78
exists ( url ) {
66
- if ( typeof this . store [ url ] !== "undefined" ) {
79
+ if ( typeof this . store [ url . toLowerCase ( ) ] !== "undefined" ) {
67
80
return true ;
68
81
} else {
69
82
return false ;
@@ -78,6 +91,7 @@ export default class InstallState {
78
91
}
79
92
80
93
async delete ( url ) {
94
+ url = url . toLowerCase ( ) ;
81
95
if ( await fsOperation ( url ) . exists ( ) ) {
82
96
await fsOperation ( url ) . delete ( ) ;
83
97
}
You can’t perform that action at this time.
0 commit comments