@@ -95,18 +95,17 @@ def update_backup_location(self):
9595 # Create a temporary local directory for staging remote files
9696 self .backup_dir = os .path .join (xbmcvfs .translatePath ('special://temp' ), 'libreelec_backupper' )
9797
98- # Ensure backup directory exists
99- if self .backup_dir and not os .path .exists (self .backup_dir ):
100- try :
101- os .makedirs (self .backup_dir )
102- except Exception as e :
103- xbmc .log (f"Error creating backup directory: { str (e )} " , xbmc .LOGERROR )
104- # Fall back to addon profile if custom location can't be created
105- self .backup_dir = xbmcvfs .translatePath (self .addon .getAddonInfo ('profile' ))
106- if not os .path .exists (self .backup_dir ):
98+ # Ensure backup directory exists (only for remote backups where we create temp dirs)
99+ if self .location_type != 0 : # Remote
100+ if self .backup_dir and not os .path .exists (self .backup_dir ):
101+ try :
107102 os .makedirs (self .backup_dir )
108- if self .location_type == 0 : # Only update setting for local backups
109- self .addon .setSetting ('backup_location' , self .backup_dir )
103+ except Exception as e :
104+ xbmc .log (f"Error creating backup directory: { str (e )} " , xbmc .LOGERROR )
105+ # Fall back to addon profile if custom location can't be created
106+ self .backup_dir = xbmcvfs .translatePath (self .addon .getAddonInfo ('profile' ))
107+ if not os .path .exists (self .backup_dir ):
108+ os .makedirs (self .backup_dir )
110109
111110 def _create_webdav_session (self ):
112111 """Create a WebDAV session with retry logic and connection pooling"""
@@ -188,9 +187,9 @@ def connect_remote(self):
188187 subprocess .call (["umount" , mount_point ], stderr = subprocess .DEVNULL )
189188
190189 # Mount the NFS share with proper options
191- # Use soft mount and shorter timeout for better error handling
192- mount_options = ["-t" , "nfs" , "-o" , "soft,timeo=10,retrans=2" ]
193- result = subprocess .call (["mount" ] + mount_options + [nfs_path , mount_point ],
190+ # Use soft mount, shorter timeout, and nolock for better compatibility
191+ mount_options = ["-t" , "nfs" , "-o" , "soft,timeo=10,retrans=2,nolock " ]
192+ result = subprocess .call (["mount" ] + mount_options + [nfs_path , mount_point ],
194193 stderr = subprocess .PIPE , stdout = subprocess .PIPE )
195194
196195 if result == 0 :
@@ -2176,4 +2175,4 @@ def get_next_scheduled_backup(self):
21762175
21772176 except Exception as e :
21782177 xbmc .log (f"{ ADDON_ID } : Error calculating next backup time: { str (e )} " , xbmc .LOGERROR )
2179- return "Unknown"
2178+ return "Unknown"
0 commit comments