• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing the home directory
#1
Mike,

I haven't tried yet because I don't want to mess with the files in my MSP home directory without being sure about this.
From the last time I changed it when I adjusted to the new relative paths I think I remember that MSP tries to move
every file to the new directory by itself regardless if they have been moved already.

Am I remembering this correct? And if so, could you please an option that I can move my files to the new directory manually
(much faster with NTFS under W10 done manually for instance) and MSP accepts the change without any file moves on its own?

(Reason, I want to move my MSP dir out of the Dropbox directory for another way to sync it with several devices)

Thanks.
Reply
#2
Looking at the code, it looks like you can already do this with Windows 10. If all of the file paths in the database are already relative to the storage location (which they should be), then when you change the storage location, it basically has no impact on the relative paths stored in the database. This unfortunately not currently true for Android, where it will convert a relative path to an absolute path and leave the old file location in place if the file does not exist after changing the storage location. I'm going to change this for the next update.

Thanks,
Mike
Reply
#3
Thanks for looking into it and good to know.

I want to change the storage location on my W10 desktop and my Surface Pro. So I'll go ahead with it. But good if you change it for the Android version, too.
Reply
#4
What exactly is the condition that signals a relative path for MSP on Android?
I manage my files myself and plan to reorganise them in a way that I can just copy mobilesheets.db from a Win10 device to an Android device and vice versa.
Maybe I should wait until that mentioned next update.
first language: German
Acer A1-830, Android 4.4.2 - HP x2 210 G2 Detachable, Win 10 22H2 - Huawei Media Pad T5, Android 8.0 - Boox Tab Ultra C, Android 11
www.moonlightcrisis.de - www.basdjo.de - www.frankenbaend.de


Reply
#5
AFAIK, if the path is under the MSPro library directory it gets treated as relative.

I have a couple of Androids and all files are in /storage/XXXX/Android/data/com.zubersoft.mobilesheets/files/Partituren/ . The XXXX varies between devices but copying the database between devices works well. In the database all paths start with Partituren/.... .
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#6
(02-08-2019, 06:17 PM)itsme Wrote: What exactly is the condition that signals a relative path for MSP on Android?
I manage my files myself and plan to reorganise them in a way that I can just copy mobilesheets.db from a Win10 device to an Android device and vice versa.

Well, that already works so far and I synchronize my Android devices and W10 with dropbox (but soon with resilio sync) with some small caveats. If you just copy your database (assuming it already has relative paths) then you should have no problem.

But changing the storage location on Android is problematic as Mike said.
Reply
#7
OK, there it is. Like I recalled.

I wanted to change the storage location under W10 (PC) and now get the message:

MobileSheets is currently managing files in the storage location. All of these files must be moved to the new location, and the process may take awhile.


That's what I don't want. I have all the files in the new storage location already (quick copy with a hardlink) and don't want that MSP moves something itself. So I hesitate to press OK.

What will MSP do, if I press OK? I don't want it to unnecessarily move huge amounts of sheets, also because I have many sheets and also many small files I didn't include in the database. (And in case it starts moving files as I suspect, can you please include the option to do it manually).
Reply
#8
Mike, did you read this?

Can you please tell me what your code does to my database and the files when I click OK (inspite of the database already having relative paths and the files are already copied to the destination directory)?
Reply
#9
I thought I had submitted a response - I'm not sure what happened. Sorry about that. MobileSheets will iterate over all of the songs in your library and will try to move the files. If the file for a particular song doesn't exist, then nothing will happen. MobileSheets will not move files in your storage location that aren't tied to a song (it's not just a blind *.* copy). It doesn't make sense for MobileSheets not to try to copy every file to the new storage location because with the Windows 10 version, every song file has to be under the storage location in order for MobileSheets to have access to it. Files cannot reside in two unrelated directories. So as long as all of your song files have been moved to the new location, there is no harm in clicking OK and letting MobileSheets try to move the non-existent files.

Mike
Reply
#10
Thanks, that helps.

So I better have to delete the files from the current storage location first (since I hardcopied them to then new one, so they're still existent at the old place). I just wanted to avoid file conflicts or even worse conversions in the database to wrong or absolute paths like it's currently in the Android version. Luckily I don't have to move the storage location there.
Reply
#11
Yeah, my bad feelings about this were warranted. I tried to move it, didn't consider that I also moved the place of the database (since I solved that with a junction from my dropbox folder to the users dir which worked fine), so I restored that.

But the change of the storage place didn't worked. So I moved it all back to the old place in my dropbox. But now when I start up MSP doesn't recognize the old storage dir any more (though it is accessible and there) and I get the message (W10 BTW)

Storage location inaccessible (etc.) with the three options 

continue waiting
change storage location to default
quit MSP

And - I think that's a flaw - you can't got to the settings and change anything when you go back to the MSP GUI from that screen.

Help, please?
Reply
#12
Is this with the Android version? If so, send me an email at mike@zubersoft.com and I'll hook you up with the latest build which will eliminate that check at startup. 

If it's with Windows 10 (which I'm assuming it based upon your previous post), then it's pretty important for access to be available to the storage location. The problem is that, if you select a folder, delete that folder, then recreate that folder, the token that MobileSheets has stored to that previous folder instance may no longer be valid (I don't know how Microsoft handles this internally).  Can you restore the previous folder instance from your recycle bin? There isn't a way for me to regain access to the new folder instance without bringing up a file browser for the user to select the folder instance again (that's how Microsoft requires the user to grant access). I think I'll modify that check at startup so that it gives you an option to select the storage location to grant access to it.

Mike
Reply
#13
Yes it's Windows. And no, I don't think I can restore the previous instance from the recycle bin. I actually didn't delete (since I'm overcautious with the loss of my files) but renamed it and created a folder with no
content in the same place.

Well, after that I got the message I described and I now chose to restore the folder in the default location so I thought I could move it from there again which I tried or rather I'm trying (and it's trying).
After the usual warning it started to move files sloooooooowly. At least it's saying it's moving files to the new storage location (where all files are already present). I'm still not sure what MSP is trying to right now. It's still only at 4 % after 2 hours (and haven't moved from 4 % for the last 50 minutes or so).

Well, I'll leave it overnight now and look at it at tomorrow again. But maybe I'm better of with using a backup copy of my database and my files and reinstall the whole thing.
Reply
#14
I'm sorry this has been such a painful process. I'll do what I can to make it easier to resolve these kinds of issues in the future. 

Thanks,
Mike
Reply
#15
Thanks. FYI MSP is still stuck at 4 % of moving the files after the night. I canceled it now and have to see what I can salvage.
Reply




Users browsing this thread:
3 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.