Skip to content

Commit

Permalink
Update apps/files/src/utils/fileUtils.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Pytal <24800714+Pytal@users.noreply.github.com>
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux and Pytal authored Mar 22, 2024
1 parent 68810e4 commit c061de9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/files/src/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ import { translate as t, translatePlural as n } from '@nextcloud/l10n'
* @param options.ignoreFileExtension Set to true to ignore the file extension when adding the suffix (when getting a unique directory name)
* @return Either the initial name, if unique, or the name with the suffix so that the name is unique
*/
export const getUniqueName = (name: string, otherNames: string[], options: { suffix?: (i: number) => string, ignoreFileExtension?: boolean } = {}): string => {
export const getUniqueName = (
name: string,
otherNames: string[],
options: {
suffix?: (i: number) => string,
ignoreFileExtension?: boolean,
} = {},
): string => {
const opts = {
suffix: (n: number) => `(${n})`,
ignoreFileExtension: false,
Expand Down

0 comments on commit c061de9

Please sign in to comment.