subfolder support
This commit is contained in:
parent
a7f2e1ca89
commit
f77a66d5d8
2 changed files with 208 additions and 65 deletions
|
|
@ -58,8 +58,10 @@ class _NoteEditorScreenState extends State<NoteEditorScreen> {
|
|||
try {
|
||||
final notesDirectory = widget.notesDirectoryPath ??
|
||||
widget.note.parent.path; // ✅ Use correct directory
|
||||
final newFilePath =
|
||||
path.join(notesDirectory, widget.note.uri.pathSegments.last);
|
||||
|
||||
// Get the full path of the original file, preserving subfolder structure
|
||||
final relativeNotePath = path.relative(widget.note.path, from: notesDirectory);
|
||||
final newFilePath = path.join(notesDirectory, relativeNotePath); // ✅ Preserve subfolder
|
||||
|
||||
print("📝 Attempting to save note at: $newFilePath");
|
||||
final newFile = File(newFilePath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue