Skip to content

Commit b93b919

Browse files
committed
Remove leading dot for hidden file filenames in autorenamer
This is seemingly expected by the autotests Signed-off-by: Claudio Cambra <[email protected]>
1 parent 82bbade commit b93b919

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/NextcloudKit/Utils/FileAutoRenamer.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ public final class FileAutoRenamer: Sendable {
7373
modifiedSegment.append(".\(fileExtension.lowercased())")
7474
}
7575

76+
if modifiedSegment.hasPrefix(".") {
77+
modifiedSegment.remove(at: modifiedSegment.startIndex)
78+
modifiedSegment = replacement + modifiedSegment
79+
}
80+
7681
return modifiedSegment
7782
}
7883

0 commit comments

Comments
 (0)