File tree 1 file changed +15
-1
lines changed
src/MagentoHackathon/Composer/Magento
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ public function __construct($fileLocation)
40
40
*/
41
41
public function addEntry ($ file )
42
42
{
43
+ $ file = $ this ->normalizeEntry ($ file );
43
44
if (!isset ($ this ->lines [$ file ])) {
44
45
$ this ->lines [$ file ] = $ file ;
45
46
}
@@ -61,6 +62,7 @@ public function addMultipleEntries(array $files)
61
62
*/
62
63
public function removeEntry ($ file )
63
64
{
65
+ $ file = $ this ->normalizeEntry ($ file );
64
66
if (isset ($ this ->lines [$ file ])) {
65
67
unset($ this ->lines [$ file ]);
66
68
$ this ->hasChanges = true ;
@@ -94,4 +96,16 @@ public function write()
94
96
file_put_contents ($ this ->gitIgnoreLocation , implode ("\n" , array_flip ($ this ->lines )));
95
97
}
96
98
}
97
- }
99
+
100
+ /**
101
+ * normalizeEntry
102
+ *
103
+ * @param string $entry
104
+ *
105
+ * @return string
106
+ */
107
+ public function normalizeEntry ($ entry )
108
+ {
109
+ return str_replace ('\\' , '/ ' , $ entry );
110
+ }
111
+ }
You can’t perform that action at this time.
0 commit comments