English Amiga Board

Go Back   English Amiga Board > Support > support.FS-UAE

Thread Tools
Old 16 May 2021, 18:03   #1
Registered User

Join Date: May 2021
Location: US
Posts: 5
uaem file not being updated

I'm using the MacOS version of FS-UAE Launcher. Version 3.0.5.

I originally saw this issue when building software on a filesystem that is a "directory hard drive". Using a 'make' utility, I would build a ".c" file into a ".o", modify the ".c" file and rebuild the ".o" file. Executing the 'make' utility WITHOUT modifying the ".c" file would keep thinking it needed to rebuild the ".o" file.

So I created an easier scenario to demonstrate what is happening.

1) go into an empty directory
2) date > x
3) look at the contents of 'x'
4) look at the output of 'list'
5) look at the 'x.uaem' file

6) go back and execute steps 2-5 again.
7) you will notice that the contents of 'x' changed neither the 'list' output nor the contents of the 'x.uaem' file have been changed.

This issue does not happen on a hard drive image (.hdf).

I turned on FS_DEBUG_FILESYS and executed the fs-uae command from the command line and captured output. I don't want to paste all that here but would happily send it along to a developer.
MarkSwanUSA is offline  
Old 16 May 2021, 19:23   #2
FS-UAE Developer
FrodeSolheim's Avatar
Join Date: Dec 2011
Location: Førde, Norway
Age: 40
Posts: 3,860
Reproduced, looks like this issue has always been present in FS-UAE.

I've just looked relatively briefly at the problem, but it looks like I need to update the timestamps stored in corresponding .uaem file whenever writes are performed to the file (if the .uaem meta file exists).

(If AmigaOS explicitly sets the timestamp on the file, it should work fine already)
FrodeSolheim is offline  
Old 17 May 2021, 03:57   #3
Registered User

Join Date: May 2021
Location: US
Posts: 5
If this is somewhere down on your priority list, I can have a look. Please let me know if you'd like me to.
MarkSwanUSA is offline  
Old 24 May 2021, 20:18   #4
Registered User

Join Date: May 2021
Location: US
Posts: 5
I grabbed the source from github and made a local change in the "fs-uae-3.0" branch that solves the problem. I took a very simplistic approach and modified the action_write() routine, forcing the ".uaem" file to be updated with the current time.

This does cause a second read/write of the ".uaem" file. The "do_find()" routine causes the first via calling fsdb_set_file_attrs(). It doesn't look like we can update the time in the ".uaem" file at that point because we have not actually modified the file yet. It isn't until action_write() that we modify the file.

I put error checking around the call to my_utime(). I think I'm correctly using PUT_PKT_RES2() in this situation but you would know better.

The most minimal change would be to call my_utime() without error checking like updatedirtime() does.

Please let me know if you'd like me to push my change to github or if you'd like to take it from here.

% git diff
diff --git a/src/filesys.cpp b/src/filesys.cpp
index 297c0b28..bfac1bed 100644
--- a/src/filesys.cpp
+++ b/src/filesys.cpp
@@ -5355,6 +5355,12 @@ static void
        if ((uae_s32)actual != -1)
                k->file_pos += actual;

+    if (!my_utime (k->aino->nname, NULL)) {
+        int err = dos_errno ();
+        if (err != 0)
+            PUT_PCK_RES2 (packet, dos_errno());
+    }
        k->notifyactive = 1;
MarkSwanUSA is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
.uaem and info.uaem files? edd_jedi support.FS-UAE 26 09 April 2018 16:35
asm code file errors and external file locations Brick Nash support.WinUAE 0 06 April 2015 17:14
ADF file browser updated with frequency. Leandro Jardim request.Apps 4 20 March 2011 19:47
File .NFO & file ID.diz stuff.... How To..!! DC33 support.Other 4 11 March 2009 10:21
Running non .adf file, .info file?? ypestis New to Emulation or Amiga scene 5 29 March 2006 18:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 20:47.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Page generated in 0.10648 seconds with 15 queries