@@ -357,7 +357,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
357357 image: utility. loadImage ( named: " doc.text " , colors: [ NCBrandColor . shared. iconImageColor] ) ) { _ in
358358 Task {
359359 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + creator. ext, account: session. account, serverUrl: serverUrl)
360- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
360+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
361361
362362 await NCCreate ( ) . createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " text " , creatorId: creator. identifier, templateId: " document " , account: session. account)
363363 }
@@ -377,7 +377,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
377377 let createDocument = NCCreate ( )
378378 let templates = await createDocument. getTemplate ( editorId: " collabora " , templateId: " document " , account: session. account)
379379 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
380- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
380+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
381381
382382 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " collabora " , templateId: templates. selectedTemplate. identifier, account: session. account)
383383 }
@@ -389,7 +389,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
389389 let createDocument = NCCreate ( )
390390 let templates = await createDocument. getTemplate ( editorId: " collabora " , templateId: " spreadsheet " , account: session. account)
391391 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
392- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
392+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
393393
394394 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " collabora " , templateId: templates. selectedTemplate. identifier, account: session. account)
395395 }
@@ -401,7 +401,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
401401 let createDocument = NCCreate ( )
402402 let templates = await createDocument. getTemplate ( editorId: " collabora " , templateId: " presentation " , account: session. account)
403403 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
404- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
404+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
405405
406406 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " collabora " , templateId: templates. selectedTemplate. identifier, account: session. account)
407407 }
@@ -417,7 +417,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
417417 let createDocument = NCCreate ( )
418418 let templates = await createDocument. getTemplate ( editorId: " onlyoffice " , templateId: " document " , account: session. account)
419419 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
420- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
420+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
421421
422422 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " onlyoffice " , creatorId: creator. identifier, templateId: templates. selectedTemplate. identifier, account: session. account)
423423 }
@@ -431,7 +431,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
431431 let createDocument = NCCreate ( )
432432 let templates = await createDocument. getTemplate ( editorId: " onlyoffice " , templateId: " spreadsheet " , account: session. account)
433433 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
434- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
434+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
435435
436436 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " onlyoffice " , creatorId: creator. identifier, templateId: templates. selectedTemplate. identifier, account: session. account)
437437 }
@@ -446,7 +446,7 @@ class NCMainNavigationController: UINavigationController, UINavigationController
446446 let createDocument = NCCreate ( )
447447 let templates = await createDocument. getTemplate ( editorId: " onlyoffice " , templateId: " presentation " , account: session. account)
448448 let fileName = await NCNetworking . shared. createFileName ( fileNameBase: NSLocalizedString ( " _untitled_ " , comment: " " ) + " . " + templates. ext, account: session. account, serverUrl: serverUrl)
449- let fileNamePath = utilityFileSystem. getFileNamePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
449+ let fileNamePath = utilityFileSystem. getRelativeFilePath ( String ( describing: fileName) , serverUrl: serverUrl, session: session)
450450
451451 await createDocument. createDocument ( controller: controller, fileNamePath: fileNamePath, fileName: String ( describing: fileName) , editorId: " onlyoffice " , creatorId: creator. identifier, templateId: templates. selectedTemplate. identifier, account: session. account)
452452 }
0 commit comments