File copied

Every time I open an existing file a file-copy is created with v068 added to the name. I would like to be able to switch that off, but have not found a solution in either Application preferences or Pattern preferences. I hope (and expect) there is a solution that I have missed.

1 Like

Your files are in an older schema, so Seamly2D automatically creates a copy so that if a bug occurs in converting the file to the new schema you still have recourse to the original file content. All you should have to do is save the file & it will stop spawning new files. After you know that the newer version is working correctly go ahead & delete the old format file.

@Douglas will tell us if I got something a little off there.

:unicorn:

2 Likes

Nope. Right on the money. Saving will stop saving a backup with the previous version suffix. Also saving as of 068 it should also be automatically renaming from the Valentina to Seamly file extensions.

2 Likes

Thank you. Being nit-pickish now. Can’t just open and save the file. I must either change something in the file and then save it OR do a ‘save as’ and replace the old file.

Doing a whole bunch I ran into something weird. If I double click the file in the windows explorer (it opens in seamly2d) and then do a ‘save as’, I get an error. [Failed to lock. File with this name is opened in an other window] YET if I find the same file from within Seamly2d and open it via ‘open’ I CAN do the ‘save as’ without trouble. Win 11, Seamly 2024.4.22.148

2 Likes

Normally, you’ll get this error when a pattern is open in another window. If you have a file open, it adds a .locked file to the explorer:

image

Sometimes, if a pattern/computer crashed and wasn’t shutdown properly, the memory of this lock file remains and causes this error. If you open the file through Seamly, it will tell you that this file wasn’t properly shutdown and do you want to open the last saved file, in which case, it should open the one above it (.autosave).

If you are busy updating all of your file extensions on all of your patterns, I’d suggest opening 1 pattern file, Save as and use the Menu > Close to close it once it’s saved. Then use the Menu > Open to open the next file.

This way, you don’t need to go to the explorer to open the next file and when you’ve done all of your patterns, you can list them by file type in explorer and delete all the .val files (after checking that you didn’t miss any).

1 Like

Yeah, It would be nice if Seamly recognised the schema update as a change in the pattern.

I have generally made a non-change, such as jiggling a Piece, but I haven’t converted enough of my files to be sure it’s an efficient method.

:unicorn:

1 Like

It’s possible I might be able to emit a patternChanged signal… thing is the (schema) conversion happens in a conversion class not the pattern class that tracks the save status. And Mainwindow doesn’t know if a pattern was converted or not - it just loads the pattern. I’ll take a look. Other thing is, you will still trigger the message dialog asking if you want to save as the new schema.

That being said… I wish I hadn’t lost the back up managment improvements I made as it limited the number of backups made, and allowed a user to see (and manage) the backups.

After updating all the test and sample patterns & measurments to the sm extensions - I found it’s easier to just save as.

2 Likes

That doesn’t seem to be the issue though… @DraftCraft reported that if a file was opened with explorer there’s a lock issue - I take that to mean regardless if the file was not previously opened and locked. I’ll take a look.

2 Likes

I don’t associate the pattern and measurement files with Seamly2D & ME… I associate them with my text editor so I can edit the XML when needed. Besides I have too many versions of Seamly installed at any given time, and I may need to open the right version to test an issue with. If I open a pattern through Explorer I use Open with… Which is why I’ve never seen this behavior. I’ll take a look into it though.

2 Likes

Ok several things.

First I was able to have a change in schema set the state of a pattern file as unsaved, so the Save() will work to update the version of the pattern.

Secondly… The change to the sm2d file extension is not a schema change… for that you have to SaveAs(). So if you load a ver 0.6.8 val file you can Save() the file to 0.6.9, but it will still have a val extension.

Thirdly… Saving and Saving As will only prevent future backups… you’re still going to get the first backup with the ver suffix…you just won’t get the multiple name_v068_(1…n) once the file is converted.

Fourthly… Having the Save() automatically rename val to the sm2s will require reorganizing the whole save process due to the order of the file locking, setting current filename, and updating the window display. In fact it may require loading & converting the file, check the file ext if = .val then save, close, reload pattern.

Conclusion… for now it’s easier to just SaveAs if you need to update to the new extension.

2 Likes

Thanks for looking into it.

:unicorn:

1 Like