We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cb73c1 commit cd4b4f9Copy full SHA for cd4b4f9
nest/src/services/ipfs/ipfs.service.ts
@@ -117,6 +117,19 @@ export class IpfsService {
117
const fullPath = path.join(dir, entry.name);
118
if (entry.isDirectory()) {
119
files.push(...(await this.getFilesRecursively(fullPath)));
120
+ } else if (entry.isSymbolicLink()) {
121
+ // Check if symlink points to a directory or file
122
+ try {
123
+ const stat = await fs.stat(fullPath);
124
+ if (stat.isDirectory()) {
125
+ files.push(...(await this.getFilesRecursively(fullPath)));
126
+ } else {
127
+ files.push(fullPath);
128
+ }
129
+ } catch {
130
+ // Skip broken symlinks
131
+ this.logger.warn(`Skipping broken symlink: ${fullPath}`);
132
133
} else {
134
files.push(fullPath);
135
}
0 commit comments