Skip to content

Commit e8144c9

Browse files
authored
Merge pull request #1060 from appwrite/pla-2730
fix: hot swapping error in python ml function
2 parents 0ec5f4a + b5712ba commit e8144c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

templates/cli/lib/utils.js.twig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ function getAllFiles(folder) {
99
const files = [];
1010
for (const pathDir of fs.readdirSync(folder)) {
1111
const pathAbsolute = path.join(folder, pathDir);
12-
if (fs.statSync(pathAbsolute).isDirectory()) {
12+
let stats;
13+
try {
14+
stats = fs.statSync(pathAbsolute);
15+
} catch (error) {
16+
continue;
17+
}
18+
if (stats.isDirectory()) {
1319
files.push(...getAllFiles(pathAbsolute));
1420
} else {
1521
files.push(pathAbsolute);

0 commit comments

Comments
 (0)