You are here

[Fixed] Musescore4 - Closing program moves folders and files

10 posts / 0 new
Last post
paulvp
Offline
Last seen: 18 hours 43 min ago
Joined: 2017-04-16 17:21
[Fixed] Musescore4 - Closing program moves folders and files

Hello

Firstly, thanks very much to the PA team for releasing Musescore4 as a portable app.

I've noticed a strange (and alarming!) behaviour in Musescore4: whenever I exit the program, all the folders used to store the various user-created files get deleted from my hard drive. They are not available in the recycle bin. I set the Musescore preferences to store files in 'Documents/Musescore4/xxxxx' where 'xxxxx' is 'Scores', 'Styles', 'Templates' etc.

As I say, when I close the program these folders, including the parent 'Musescore4' folder get deleted from the hard drive. Obviously all the files contained therein are also gone. Strangely, when I re-launch Musescore4, the folders and files are returned.

Has anyone else experienced this and/or can anyone shed any light on why this is happening or provide a fix?

Kind regards
Paul vP

Ken Herbert
Ken Herbert's picture
Online
Last seen: 7 min 3 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
That is expected

That is the expected behaviour, nothing to worry about. It is part of how many of our portable apps work.

Where a particular app doesn't give us an environment variable to redirect where user files/folders are placed the Launcher instead does the following when run:

  1. The PortableApps Launcher for the app starts.
  2. It backs up the user files/folders for the app that are already on the computer (if they exist).
  3. It copies the user files/folders of the portable version of the app to where they should be on the computer.
  4. It starts the "real" app bundled within our portable package, then waits quietly in the background.

When you close the portable app the reverse happens:

  1. The Launcher sees the "real" app close.
  2. It copies the user files/folders from the computer to the portable version of the app's folder, making sure your user data stays with the portable app.
  3. It puts the original user files/folders for the app back where they were (if they were there before).
  4. The Launcher finally closes.
paulvp
Offline
Last seen: 18 hours 43 min ago
Joined: 2017-04-16 17:21
Expected behaviour

Thanks very much Ken. I didn't experience this issue with Musescore 3 so I guess it's a 'feature' of the new version :).

A complicating factor for me is that I backup all the files in my Documents folder (including Musescore *.mscz files) to the cloud. Since I have hundreds of *.mszc files, every time I open and close Musescore 4, these files are uploaded to, or deleted from, my cloud service. I guess I'll either just have to live with that or use the installed (non-portable) version of Musescore.

Cheers
Paul

Bart.S
Offline
Last seen: 1 month 3 weeks ago
Developer
Joined: 2008-07-23 07:56
No

That's not expected. PortableApps used setting environment variables, command line switches or "portable" defaults. No copying needed in most cases.

paulvp
Offline
Last seen: 18 hours 43 min ago
Joined: 2017-04-16 17:21
Clarification

I've just realised there's something I didn't make clear in my original post:

While I use portable apps whenever possible, I install and run these apps from the fixed hard drive of my PC, not from a USB stick or external drive. Any content I create with these portable apps (e.g. OpenOffice documents; Musescore scores) are saved to the Windows Documents folder, not the Documents folder created by the PA Platform installation.

It is the Musescore content (scores, styles, templates) in the Windows Documents folder that disappears and reappears each time Musescore4 is closed or launched.

Not sure what difference this makes, if any.

Cheers
Paul vP

depp.jones
Offline
Last seen: 1 week 6 days ago
DeveloperTranslator
Joined: 2010-06-05 17:19
Hi paulvp,

Hi paulvp,
as Ken explained, that's the way, Portable Apps from this site here are designed. Even if you use it locally on your hard drive (I do that most of the time), the mechanics behind the launcher make no difference to using it on an external drive. The main task of the PA.c-launcher is to prevent normal leftovers, mixing of local settings with the portable ones and adapting paths and drive letters when they change (more). These aspects don't really matter that much when used as a kind of self contained local installation but there is no way so far to tell the launcher to act differently in this situation.
That said - creating a new folder with settings, styles and content on a guest machine definitely needs handling by the launcher as no one wants to leave their files and settings behind when disconnecting the external drive.

But there is an easy fix for your problem. You said that you set the directories to MuseScore4 in Documents, but that is the default that is portablized by the launcher for thr reasons mentioned before.
You can easily set another folder - Musescorecontent for example - in the Documents root for your content manually in the settings. This folder then wil not be handled by the launcher and is persistant after closing MuseScore.

Btw. I started using MuseScore4 two weeks ago as local installation and while testing your setup, I found some portablization issues. Wink

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 9 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Changing Shortly

This behavior will hopefully be changing shortly with a revision I am working on. I'll keep you in the loop.

Sometimes, the impossible can become possible, if you're awesome!

Bart.S
Offline
Last seen: 1 month 3 weeks ago
Developer
Joined: 2008-07-23 07:56
Custom code

I know you don't like custom code, but take a look at the MuseScore Portable 2.x code. It has a nice solution for setting defaults.

John T. Haller
John T. Haller's picture
Offline
Last seen: 6 hours 9 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in MuseScore Portable 4.0.1 Rev 2

Rev 2 has been posted which will keep scores, templates, etc within MuseScore Portable itself. It also won't move local scores, templates, etc. The only thing moved back and forth to the local machine now is the Cloud Scores directory as MuseScore has that hard-coded within the local Documents path.

Sometimes, the impossible can become possible, if you're awesome!

paulvp
Offline
Last seen: 18 hours 43 min ago
Joined: 2017-04-16 17:21
Thank you

Thanks very much John.

Paul vP

Log in or register to post comments